Skip to content

Commit dbd43c9

Browse files
committed
Added spamfilter white- and blacklists.
1 parent c40e1fe commit dbd43c9

19 files changed

+975
-3
lines changed
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?php
2+
3+
/*
4+
Form Definition
5+
6+
Tabledefinition
7+
8+
Datatypes:
9+
- INTEGER (Forces the input to Int)
10+
- DOUBLE
11+
- CURRENCY (Formats the values to currency notation)
12+
- VARCHAR (no format check, maxlength: 255)
13+
- TEXT (no format check)
14+
- DATE (Dateformat, automatic conversion to timestamps)
15+
16+
Formtype:
17+
- TEXT (Textfield)
18+
- TEXTAREA (Textarea)
19+
- PASSWORD (Password textfield, input is not shown when edited)
20+
- SELECT (Select option field)
21+
- RADIO
22+
- CHECKBOX
23+
- CHECKBOXARRAY
24+
- FILE
25+
26+
VALUE:
27+
- Wert oder Array
28+
29+
Hint:
30+
The ID field of the database table is not part of the datafield definition.
31+
The ID field must be always auto incement (int or bigint).
32+
33+
34+
*/
35+
36+
$form["title"] = "Spamfilter blacklist";
37+
$form["description"] = "";
38+
$form["name"] = "spamfilter_blacklist";
39+
$form["action"] = "spamfilter_blacklist_edit.php";
40+
$form["db_table"] = "spamfilter_wblist";
41+
$form["db_table_idx"] = "wblist_id";
42+
$form["db_history"] = "yes";
43+
$form["tab_default"] = "blacklist";
44+
$form["list_default"] = "spamfilter_blacklist_list.php";
45+
$form["auth"] = 'yes'; // yes / no
46+
47+
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
48+
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
49+
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
50+
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
51+
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
52+
53+
$form["tabs"]['blacklist'] = array (
54+
'title' => "Witelist",
55+
'width' => 100,
56+
'template' => "templates/spamfilter_blacklist_edit.htm",
57+
'fields' => array (
58+
##################################
59+
# Begin Datatable fields
60+
##################################
61+
'server_id' => array (
62+
'datatype' => 'INTEGER',
63+
'formtype' => 'SELECT',
64+
'default' => '',
65+
'datasource' => array ( 'type' => 'SQL',
66+
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
67+
'keyfield'=> 'server_id',
68+
'valuefield'=> 'server_name'
69+
),
70+
'value' => ''
71+
),
72+
'wb' => array (
73+
'datatype' => 'VARCHAR',
74+
'formtype' => 'TEXT',
75+
'default' => 'B',
76+
'value' => array('W' => 'blacklist', 'B' => 'Blacklist')
77+
),
78+
'rid' => array (
79+
'datatype' => 'INTEGER',
80+
'formtype' => 'SELECT',
81+
'default' => '',
82+
'datasource' => array ( 'type' => 'SQL',
83+
'querystring' => 'SELECT id,email FROM spamfilter_users WHERE {AUTHSQL} ORDER BY email',
84+
'keyfield'=> 'id',
85+
'valuefield'=> 'email'
86+
),
87+
'value' => ''
88+
),
89+
'email' => array (
90+
'datatype' => 'VARCHAR',
91+
'formtype' => 'TEXT',
92+
'default' => '',
93+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
94+
'errmsg'=> 'email_error_notempty'),
95+
),
96+
'value' => '',
97+
'width' => '30',
98+
'maxlength' => '255'
99+
),
100+
'priority' => array (
101+
'datatype' => 'INTEGER',
102+
'formtype' => 'SELECT',
103+
'default' => 5,
104+
'value' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10)
105+
),
106+
'active' => array (
107+
'datatype' => 'VARCHAR',
108+
'formtype' => 'CHECKBOX',
109+
'default' => 'y',
110+
'value' => array(0 => 'n',1 => 'y')
111+
),
112+
##################################
113+
# ENDE Datatable fields
114+
##################################
115+
)
116+
);
117+
118+
119+
?>
Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
<?php
2+
3+
/*
4+
Form Definition
5+
6+
Tabledefinition
7+
8+
Datatypes:
9+
- INTEGER (Forces the input to Int)
10+
- DOUBLE
11+
- CURRENCY (Formats the values to currency notation)
12+
- VARCHAR (no format check, maxlength: 255)
13+
- TEXT (no format check)
14+
- DATE (Dateformat, automatic conversion to timestamps)
15+
16+
Formtype:
17+
- TEXT (Textfield)
18+
- TEXTAREA (Textarea)
19+
- PASSWORD (Password textfield, input is not shown when edited)
20+
- SELECT (Select option field)
21+
- RADIO
22+
- CHECKBOX
23+
- CHECKBOXARRAY
24+
- FILE
25+
26+
VALUE:
27+
- Wert oder Array
28+
29+
Hint:
30+
The ID field of the database table is not part of the datafield definition.
31+
The ID field must be always auto incement (int or bigint).
32+
33+
34+
*/
35+
36+
$form["title"] = "Spamfilter Whitelist";
37+
$form["description"] = "";
38+
$form["name"] = "spamfilter_whitelist";
39+
$form["action"] = "spamfilter_whitelist_edit.php";
40+
$form["db_table"] = "spamfilter_wblist";
41+
$form["db_table_idx"] = "wblist_id";
42+
$form["db_history"] = "yes";
43+
$form["tab_default"] = "whitelist";
44+
$form["list_default"] = "spamfilter_whitelist_list.php";
45+
$form["auth"] = 'yes'; // yes / no
46+
47+
$form["auth_preset"]["userid"] = 0; // 0 = id of the user, > 0 id must match with id of current user
48+
$form["auth_preset"]["groupid"] = 0; // 0 = default groupid of the user, > 0 id must match with groupid of current user
49+
$form["auth_preset"]["perm_user"] = 'riud'; //r = read, i = insert, u = update, d = delete
50+
$form["auth_preset"]["perm_group"] = 'riud'; //r = read, i = insert, u = update, d = delete
51+
$form["auth_preset"]["perm_other"] = ''; //r = read, i = insert, u = update, d = delete
52+
53+
$form["tabs"]['whitelist'] = array (
54+
'title' => "Witelist",
55+
'width' => 100,
56+
'template' => "templates/spamfilter_whitelist_edit.htm",
57+
'fields' => array (
58+
##################################
59+
# Begin Datatable fields
60+
##################################
61+
'server_id' => array (
62+
'datatype' => 'INTEGER',
63+
'formtype' => 'SELECT',
64+
'default' => '',
65+
'datasource' => array ( 'type' => 'SQL',
66+
'querystring' => 'SELECT server_id,server_name FROM server WHERE {AUTHSQL} ORDER BY server_name',
67+
'keyfield'=> 'server_id',
68+
'valuefield'=> 'server_name'
69+
),
70+
'value' => ''
71+
),
72+
'wb' => array (
73+
'datatype' => 'VARCHAR',
74+
'formtype' => 'TEXT',
75+
'default' => 'W',
76+
'value' => array('W' => 'Whitelist', 'B' => 'Blacklist')
77+
),
78+
'rid' => array (
79+
'datatype' => 'INTEGER',
80+
'formtype' => 'SELECT',
81+
'default' => '',
82+
'datasource' => array ( 'type' => 'SQL',
83+
'querystring' => 'SELECT id,email FROM spamfilter_users WHERE {AUTHSQL} ORDER BY email',
84+
'keyfield'=> 'id',
85+
'valuefield'=> 'email'
86+
),
87+
'value' => ''
88+
),
89+
'email' => array (
90+
'datatype' => 'VARCHAR',
91+
'formtype' => 'TEXT',
92+
'default' => '',
93+
'validators' => array ( 0 => array ( 'type' => 'NOTEMPTY',
94+
'errmsg'=> 'email_error_notempty'),
95+
),
96+
'value' => '',
97+
'width' => '30',
98+
'maxlength' => '255'
99+
),
100+
'priority' => array (
101+
'datatype' => 'INTEGER',
102+
'formtype' => 'SELECT',
103+
'default' => 5,
104+
'value' => array(1 => 1, 2 => 2, 3 => 3, 4 => 4, 5 => 5, 6 => 6, 7 => 7, 8 => 8, 9 => 9, 10 => 10)
105+
),
106+
'active' => array (
107+
'datatype' => 'VARCHAR',
108+
'formtype' => 'CHECKBOX',
109+
'default' => 'y',
110+
'value' => array(0 => 'n',1 => 'y')
111+
),
112+
##################################
113+
# ENDE Datatable fields
114+
##################################
115+
)
116+
);
117+
118+
119+
?>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Server';
3+
$wb["wb_txt"] = 'wb';
4+
$wb["rid_txt"] = 'User';
5+
$wb["email_txt"] = 'Email';
6+
$wb["priority_txt"] = 'Priority';
7+
$wb["active_txt"] = 'Active';
8+
$wb["btn_save_txt"] = 'Save';
9+
$wb["btn_cancel_txt"] = 'Cancel';
10+
?>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
$wb["list_head_txt"] = 'Spamfilter Blacklist';
3+
$wb["active_txt"] = 'Active';
4+
$wb["server_id_txt"] = 'Server';
5+
$wb["priority_txt"] = 'Priority';
6+
$wb["rid_txt"] = 'User';
7+
$wb["email_txt"] = 'Whitelisted Email';
8+
$wb["page_txt"] = 'Page';
9+
$wb["page_of_txt"] = 'of';
10+
$wb["page_next_txt"] = 'Next';
11+
$wb["page_back_txt"] = 'Back';
12+
$wb["delete_txt"] = 'Delete';
13+
$wb["filter_txt"] = 'Filter';
14+
$wb["add_new_record_txt"] = 'Add Blacklist record';
15+
?>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
$wb["server_id_txt"] = 'Server';
3+
$wb["wb_txt"] = 'wb';
4+
$wb["rid_txt"] = 'User';
5+
$wb["email_txt"] = 'Email';
6+
$wb["priority_txt"] = 'Priority';
7+
$wb["active_txt"] = 'Active';
8+
$wb["btn_save_txt"] = 'Save';
9+
$wb["btn_cancel_txt"] = 'Cancel';
10+
?>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?php
2+
$wb["list_head_txt"] = 'Spamfilter Whitelist';
3+
$wb["active_txt"] = 'Active';
4+
$wb["server_id_txt"] = 'Server';
5+
$wb["priority_txt"] = 'Priority';
6+
$wb["rid_txt"] = 'User';
7+
$wb["email_txt"] = 'Whitelisted Email';
8+
$wb["page_txt"] = 'Page';
9+
$wb["page_of_txt"] = 'of';
10+
$wb["page_next_txt"] = 'Next';
11+
$wb["page_back_txt"] = 'Back';
12+
$wb["delete_txt"] = 'Delete';
13+
$wb["filter_txt"] = 'Filter';
14+
$wb["add_new_record_txt"] = 'Add Whitelist record';
15+
?>

interface/web/mail/lib/module.conf.php

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,21 +70,41 @@
7070
'target' => 'content',
7171
'link' => 'mail/mail_blacklist_list.php',
7272
),
73+
),
74+
),
75+
2 =>
76+
array (
77+
'title' => 'Spamfilter',
78+
'open' => 1,
79+
'items' =>
80+
array (
81+
0 =>
82+
array (
83+
'title' => 'Whitelist',
84+
'target' => 'content',
85+
'link' => 'mail/spamfilter_whitelist_list.php',
86+
),
87+
1 =>
88+
array (
89+
'title' => 'Blacklist',
90+
'target' => 'content',
91+
'link' => 'mail/spamfilter_blacklist_list.php',
92+
),
7393
2 =>
7494
array (
75-
'title' => 'Users',
95+
'title' => 'User',
7696
'target' => 'content',
7797
'link' => 'mail/spamfilter_user_list.php',
7898
),
7999
3 =>
80100
array (
81-
'title' => 'Policys',
101+
'title' => 'Policy',
82102
'target' => 'content',
83103
'link' => 'mail/spamfilter_policy_list.php',
84104
),
85105
),
86106
),
87-
2 =>
107+
3 =>
88108
array (
89109
'title' => 'Fetchmail',
90110
'open' => 1,

0 commit comments

Comments
 (0)