Skip to content

Commit c9dfe47

Browse files
author
pedro_morgan
committed
WIP
1 parent 55438f6 commit c9dfe47

File tree

4 files changed

+264
-9
lines changed

4 files changed

+264
-9
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
4+
5+
$tables['web_domain'] = "
6+
`domain_id` bigint(20) NOTNULL AUTO PRIMARY,
7+
`sys_userid` I NOTNULL DEFAULT '0',
8+
`sys_groupid` I NOTNULL DEFAULT '0',
9+
`sys_perm_user` C(5) ,
10+
`sys_perm_group` C(5) ,
11+
`sys_perm_other` C(5) ,
12+
`server_id` I NOTNULL DEFAULT '0',
13+
`ip_address` C(15) ,
14+
`domain` C(255) ,
15+
`type` C(255) NOTNULL DEFAULT 'y',
16+
`parent_domain_id` I NOTNULL DEFAULT '0',
17+
`vhost_type` C(255) ,
18+
`document_root` C(255) ,
19+
`system_user` C(255) ,
20+
`system_group` C(255) ,
21+
`hd_quota` I NOTNULL DEFAULT '0',
22+
`traffic_quota` I NOTNULL DEFAULT '0',
23+
`cgi` C(255) NOTNULL DEFAULT 'y',
24+
`ssi` C(255) NOTNULL DEFAULT 'y',
25+
`suexec` C(255) NOTNULL DEFAULT 'y',
26+
`php` C(255) NOTNULL DEFAULT 'y',
27+
`redirect_type` C(255) ,
28+
`redirect_path` C(255) ,
29+
`active` C(255) NOTNULL DEFAULT 'y',
30+
PRIMARY KEY (`domain_id`)
31+
) ;
32+
?>

interface/sql/db_installer_sandbox/defs.mail_spam.php

Lines changed: 186 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,24 @@
11
<?php
22

3-
/* Down the page
4-
* Mail related
5-
* System related
6-
*/
7-
83
//*************************************************************************************
94
// Mail Related
105
//*************************************************************************************
116

7+
$tables['mail_access'] = "
8+
`access_id` int(11) NOT NULL AUTO PRIMARY,
9+
`sys_userid` int(11) NOTNULL DEFAULT '0',
10+
`sys_groupid` int(11) NOTNULL DEFAULT '0',
11+
`sys_perm_user` C(5) NOTNULL DEFAULT '',
12+
`sys_perm_group` C(5) NOTNULL DEFAULT '',
13+
`sys_perm_other` C(5) NOTNULL DEFAULT '',
14+
`server_id` I INDEX NOTNULL DEFAULT '0',
15+
`source` C(255) INDEX NOT NULL,
16+
`access` C(255) NOT NULL,
17+
`type` set('recipient','sender','client') NOT NULL,
18+
`active` enum('n','y') NOTNULL DEFAULT 'y'
19+
";
20+
21+
1222
$tables['mail_blacklist'] = "
1323
blacklist_id I NOTNULL AUTO PRIMARY,
1424
sys_userid I NOTNULL DEFAULT '0',
@@ -43,6 +53,21 @@
4353
active enum('0','1') NOTNULL DEFAULT '1'
4454
";
4555

56+
$tables['mail_content_filter'] = "
57+
`content_filter_id` bigint(20) NOTNULL AUTO PRIMARY,
58+
`sys_userid` int(11) NOTNULL DEFAULT '0',
59+
`sys_groupid` int(11) NOTNULL DEFAULT '0',
60+
`sys_perm_user` C(5),
61+
`sys_perm_group` C(5),
62+
`sys_perm_other` C(5),
63+
`server_id` int(11) NOTNULL DEFAULT '0',
64+
`type` C(255),
65+
`pattern` C(255),
66+
`data` C(255),
67+
`action` C(255) ,
68+
`active` C(255) NOTNULL DEFAULT 'y'
69+
";
70+
4671
$tables['mail_domain'] = "
4772
domain_id I NOTNULL AUTO PRIMARY,
4873
sys_userid I NOTNULL DEFAULT '0',
@@ -70,6 +95,36 @@
7095
active enum('0','1') NOTNULL DEFAULT '1'
7196
";
7297

98+
$tables['mail_forwarding'] = "
99+
`forwarding_id` int(11) NOTNULL AUTO PRIMARY,
100+
`sys_userid` int(11) NOTNULL DEFAULT '0',
101+
`sys_groupid` int(11) NOTNULL DEFAULT '0',
102+
`sys_perm_user` C(5) NOTNULL DEFAULT '',
103+
`sys_perm_group` C(5) NOTNULL DEFAULT '',
104+
`sys_perm_other` C(5) NOTNULL DEFAULT '',
105+
`server_id` I INDEX NOTNULL DEFAULT '0',
106+
`source` C(255) INDEX NOTNULL,
107+
`destination` C(255) NOTNULL DEFAULT '',
108+
`type` enum('alias','forward','catchall') NOTNULL DEFAULT 'alias',
109+
`active` enum('y','n') NOTNULL
110+
";
111+
112+
$tables['mail_get'] = "
113+
`mailget_id` bigint(20) NOT NULL AUTO PRIMARY,
114+
`sys_userid` int(11) NOTNULL DEFAULT '0',
115+
`sys_groupid` int(11) NOTNULL DEFAULT '0',
116+
`sys_perm_user` C(5) ,
117+
`sys_perm_group` C(5) ,
118+
`sys_perm_other` C(5) ,
119+
`server_id` int(11) NOTNULL DEFAULT '0',
120+
`type` C(255) ,
121+
`source_server` C(255) ,
122+
`source_username` C(255) ,
123+
`source_password` C(255) ,
124+
`source_delete` C(255) NOTNULL DEFAULT 'y',
125+
`destination` C(255) ,
126+
`active` C(255) NOTNULL DEFAULT 'y'
127+
"
73128
74129
$tables['mail_greylist'] = "
75130
greylist_id I NOTNULL AUTO PRIMARY,
@@ -123,6 +178,12 @@
123178
active enum('0','1') NOTNULL DEFAULT '1'
124179
";
125180

181+
$tables['mail_traffic'] = "
182+
`traffic_id` I NOTNULL AUTO PRIMARY,
183+
`mailuser_id` I NOTNULL,
184+
`month` C(7) INDEX NOTNULL,
185+
`traffic` bigint(20) unsigned NOT NULL
186+
";
126187

127188
$tables['mail_transport'] = "
128189
transport_id I NOTNULL AUTO PRIMARY,
@@ -139,6 +200,29 @@
139200
active enum('0','1') NOTNULL DEFAULT '1'
140201
";
141202

203+
$tables['mail_user'] = "
204+
`mailuser_id` I NOTNULL AUTO PRIMARY,
205+
`sys_userid` I NOTNULL DEFAULT '0',
206+
`sys_groupid` I NOTNULL DEFAULT '0',
207+
`sys_perm_user` C(5) NOTNULL DEFAULT '',
208+
`sys_perm_group` C(5) NOTNULL DEFAULT '',
209+
`sys_perm_other` C(5) NOTNULL DEFAULT '',
210+
`server_id` I INDEX NOTNULL DEFAULT '0',
211+
`email` C(255) INDEX NOTNULL DEFAULT '',
212+
`password` C(255) NOTNULL,
213+
`name` C(128) NOTNULL DEFAULT '',
214+
`uid` int(10) unsigned NOTNULL DEFAULT '5000',
215+
`gid` int(10) unsigned NOTNULL DEFAULT '5000',
216+
`maildir` C(255) NOTNULL DEFAULT '',
217+
`quota` I NOTNULL,
218+
`homedir` C(255) NOTNULL,
219+
`autoresponder` enum('n','y') NOTNULL DEFAULT 'n',
220+
`autoresponder_text` tinytext NOTNULL,
221+
`custom_mailfilter` text,
222+
`postfix` enum('y','n') NOTNULL,
223+
`access` enum('y','n') NOTNULL
224+
";
225+
142226
$tables['mail_whitelist'] = "
143227
whitelist_id I NOTNULL AUTO PRIMARY,
144228
sys_userid I NOTNULL DEFAULT '0',
@@ -152,6 +236,89 @@
152236
active enum('0','1') NOTNULL DEFAULT '1'
153237
";
154238

239+
240+
//*************************************************************************************
241+
// Spam spam spam spam, sing along..
242+
//*************************************************************************************
243+
244+
$tables['spamfilter_policy'] = "
245+
`id` I NOTNULL AUTO PRIMARY,
246+
`sys_userid` I NOTNULL,
247+
`sys_groupid` I NOTNULL,
248+
`sys_perm_user` C(5) NOTNULL,
249+
`sys_perm_group` C(5) NOTNULL,
250+
`sys_perm_other` C(5) NOTNULL,
251+
`policy_name` C(32) ,
252+
`virus_lover` C(1) ,
253+
`spam_lover` C(1) ,
254+
`banned_files_lover` C(1) ,
255+
`bad_header_lover` C(1) ,
256+
`bypass_virus_checks` C(1) ,
257+
`bypass_spam_checks` C(1) ,
258+
`bypass_banned_checks` C(1) ,
259+
`bypass_header_checks` C(1) ,
260+
`spam_modifies_subj` C(1) ,
261+
`virus_quarantine_to` C(64) ,
262+
`spam_quarantine_to` C(64) ,
263+
`banned_quarantine_to` C(64) ,
264+
`bad_header_quarantine_to` C(64) ,
265+
`clean_quarantine_to` C(64) ,
266+
`other_quarantine_to` C(64) ,
267+
`spam_tag_level` F,
268+
`spam_tag2_level` F,
269+
`spam_kill_level` F,
270+
`spam_dsn_cutoff_level` F,
271+
`spam_quarantine_cutoff_level` F,
272+
`addr_extension_virus` C(64) ,
273+
`addr_extension_spam` C(64) ,
274+
`addr_extension_banned` C(64) ,
275+
`addr_extension_bad_header` C(64) ,
276+
`warnvirusrecip` C(1) ,
277+
`warnbannedrecip` C(1) ,
278+
`warnbadhrecip` C(1) ,
279+
`newvirus_admin` C(64) ,
280+
`virus_admin` C(64) ,
281+
`banned_admin` C(64) ,
282+
`bad_header_admin` C(64) ,
283+
`spam_admin` C(64) ,
284+
`spam_subject_tag` C(64) ,
285+
`spam_subject_tag2` C(64) ,
286+
`message_size_limit` I ,
287+
`banned_rulenames` C(64)
288+
";
289+
290+
//TODO Unique index on email
291+
$tables['spamfilter_users'] = "
292+
`id` int(10) NOTNULL AUTO PRIMARY,
293+
`sys_userid` I NOTNULL,
294+
`sys_groupid` I NOTNULL,
295+
`sys_perm_user` C(5) NOTNULL,
296+
`sys_perm_group` C(5) NOTNULL,
297+
`sys_perm_other` C(5) NOTNULL,
298+
`server_id` int(10) unsigned NOTNULL,
299+
`priority` I NOTNULL DEFAULT '7',
300+
`policy_id` int(10) unsigned NOTNULL DEFAULT '1',
301+
`email` C(255) INDEX NOTNULL,
302+
`fullname` C(255) ,
303+
`local` char(1)
304+
";
305+
306+
//TODO Enum
307+
$tables['spamfilter_wblist'] = "
308+
`wblist_id` I NOTNULL AUTO PRIMARY,
309+
`sys_userid` I NOTNULL,
310+
`sys_groupid` I NOTNULL,
311+
`sys_perm_user` C(5) NOTNULL,
312+
`sys_perm_group` C(5) NOTNULL,
313+
`sys_perm_other` C(5) NOTNULL,
314+
`server_id` int(10) unsigned NOTNULL,
315+
`wb` enum('W','B') NOTNULL DEFAULT 'W',
316+
`rid` int(10) unsigned NOTNULL,
317+
`email` C(255) NOTNULL,
318+
`priority` I NOTNULL,
319+
`active` enum('y','n') NOTNULL DEFAULT 'y'
320+
";
321+
155322
$tables['rr'] = "
156323
id int(10) unsigned NOTNULL AUTO PRIMARY,
157324
zone int(10) unsigned NOTNULL DEFAULT '0',
@@ -186,6 +353,20 @@
186353
active tinyint(4) NOTNULL DEFAULT '1',
187354
";
188355

356+
357+
$tables['server_ip'] = "
358+
`server_ip_id` bigint(20) NOTNULL AUTO PRIMARY,
359+
`sys_userid` I NOTNULL DEFAULT '0',
360+
`sys_groupid` I NOTNULL DEFAULT '0',
361+
`sys_perm_user` C(5) ,
362+
`sys_perm_group` C(5) ,
363+
`sys_perm_other` C(5) ,
364+
`server_id` int(10) unsigned NOTNULL DEFAULT '0',
365+
`ip_address` C(15) ,
366+
`virtualhost` C(1) NOTNULL DEFAULT 'y'
367+
";
368+
369+
189370
$tables['soa'] = "
190371
id int(10) unsigned NOTNULL AUTO PRIMARY,
191372
origin C(255) NOTNULL DEFAULT '',

interface/sql/db_installer_sandbox/defs.resellers_clients.php

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,48 @@
44
//*************************************************************************************
55
// Resellers, clients etc
66
//*************************************************************************************
7+
$tables['client'] = "
8+
`client_id` bigint(20) NOT NULL AUTO PRIMARY,
9+
`sys_userid` int(11) NOTNULL DEFAULT '0',
10+
`sys_groupid` int(11) NOTNULL DEFAULT '0',
11+
`sys_perm_user` C(5),
12+
`sys_perm_group` C(5),
13+
`sys_perm_other` C(5),
14+
`company_name` C(255),
15+
`contact_name` C(255),
16+
`street` C(255),
17+
`zip` C(255),
18+
`city` C(255),
19+
`state` C(255),
20+
`country` C(255),
21+
`telephone` C(255),
22+
`mobile` C(255),
23+
`fax` C(255),
24+
`email` C(255),
25+
`internet` C(255) NOTNULL DEFAULT 'http://',
26+
`icq` C(255),
27+
`notes` text,
28+
`default_mailserver` int(11) NOTNULL DEFAULT '1',
29+
`limit_maildomain` int(11) NOTNULL DEFAULT '-1',
30+
`limit_mailbox` int(11) NOTNULL DEFAULT '-1',
31+
`limit_mailalias` int(11) NOTNULL DEFAULT '-1',
32+
`limit_mailforward` int(11) NOTNULL DEFAULT '-1',
33+
`limit_mailcatchall` int(11) NOTNULL DEFAULT '-1',
34+
`limit_mailrouting` int(11) NOTNULL DEFAULT '0',
35+
`limit_mailfilter` int(11) NOTNULL DEFAULT '-1',
36+
`limit_fetchmail` int(11) NOTNULL DEFAULT '-1',
37+
`limit_mailquota` int(11) NOTNULL DEFAULT '-1',
38+
`limit_spamfilter_wblist` int(11) NOTNULL DEFAULT '0',
39+
`limit_spamfilter_user` int(11) NOTNULL DEFAULT '0',
40+
`limit_spamfilter_policy` int(11) NOTNULL DEFAULT '0',
41+
`default_webserver` int(11) NOT NULL,
42+
`limit_web_ip` text NOT NULL,
43+
`username` C(255) ,
44+
`password` C(255) ,
45+
`language` C(255) NOTNULL DEFAULT 'en',
46+
`usertheme` C(255) NOTNULL DEFAULT 'default'
47+
";
48+
749

850
$tables['reseller'] = "
951
reseller_id bigint(20) NOTNULL AUTO PRIMARY,

interface/sql/db_installer_sandbox/defs.system.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@
55
//*************************************************************************************
66

77
$tables['sys_datalog'] = "
8-
datalog_id bigint(20) NOTNULL AUTO PRIMARY,
8+
datalog_id I8 NOTNULL AUTO PRIMARY,
9+
server_id I NOTNULL,
910
dbtable C(255) NOTNULL DEFAULT '',
1011
dbidx C(255) NOTNULL DEFAULT '',
11-
server_id I NOTNULL DEFAULT '0',
1212
action char(1) NOTNULL DEFAULT '',
13-
tstamp bigint(20) NOTNULL DEFAULT '0',
13+
tstamp I8 NOTNULL DEFAULT '0',
1414
user C(255) NOTNULL DEFAULT '',
15-
data text NOTNULL
15+
data X NOTNULL
1616
";
1717

1818
$tables['sys_dbsync'] = "

0 commit comments

Comments
 (0)