ispconfig3.sql 103 KB
Newer Older
tbrehm's avatar
tbrehm committed
1
/*
2
Copyright (c) 2007-2012, Till Brehm, projektfarm Gmbh
tbrehm's avatar
tbrehm committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

    * Redistributions of source code must retain the above copyright notice,
      this list of conditions and the following disclaimer.
    * Redistributions in binary form must reproduce the above copyright notice,
      this list of conditions and the following disclaimer in the documentation
      and/or other materials provided with the distribution.
    * Neither the name of ISPConfig nor the names of its contributors
      may be used to endorse or promote products derived from this software without
      specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

29
30
-- Includes 
-- 
31
-- iso_country_list.sql
32
-- 
33
34
-- This will create and then populate a MySQL table with a list of the names and
-- ISO 3166 codes for countries in existence as of the date below.
35
-- 
36
37
-- For updates to this file, see http://27.org/isocountrylist/
-- For more about ISO 3166, see http://www.iso.ch/iso/en/prods-services/iso3166ma/02iso-3166-code-lists/list-en1.html
38
-- 
39
40
-- Created by getisocountrylist.pl on Sun Nov  2 14:59:20 2003.
-- Wm. Rhodes <iso_country_list@27.org>
41
-- 
42

43
-- 
tbrehm's avatar
tbrehm committed
44
45
-- ISPConfig 3
-- DB-Version: 3.0.0.9
46
-- 
tbrehm's avatar
tbrehm committed
47
48
49
50
51
52
53
54
55

SET FOREIGN_KEY_CHECKS = 0;

-- --------------------------------------------------------
-- --------------------------------------------------------
-- DB-STRUCTURE
-- --------------------------------------------------------
-- --------------------------------------------------------

Marius Burkard's avatar
Marius Burkard committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
--
-- Table structure for table `addons`
--

CREATE TABLE IF NOT EXISTS `addons` (
  `addon_id` int(11) NOT NULL AUTO_INCREMENT,
  `addon_ident` VARCHAR(100) NOT NULL DEFAULT '',
  `addon_version` VARCHAR(20) NOT NULL DEFAULT '',
  `addon_name` VARCHAR(255) NOT NULL DEFAULT '',
  `db_version` INT(6) NOT NULL DEFAULT '0',
  PRIMARY KEY (`addon_id`),
  UNIQUE KEY `ident` (`addon_ident`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

72
73
74
75
76
77
--
-- Table structure for table `aps_instances`
--

CREATE TABLE IF NOT EXISTS `aps_instances` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
78
79
80
81
82
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
83
  `server_id` int(11) NOT NULL DEFAULT '0',
84
85
86
  `customer_id` int(4) NOT NULL DEFAULT '0',
  `package_id` int(4) NOT NULL DEFAULT '0',
  `instance_status` int(4) NOT NULL DEFAULT '0',
87
88
89
90
91
92
93
94
95
96
97
98
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

--
-- Table structure for table `aps_instances_settings`
--

CREATE TABLE IF NOT EXISTS `aps_instances_settings` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
  `server_id` int(11) NOT NULL DEFAULT '0',
99
100
101
  `instance_id` int(4) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` text,
102
103
104
105
106
107
108
109
110
111
112
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

--
-- Table structure for table `aps_packages`
--

CREATE TABLE IF NOT EXISTS `aps_packages` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
113
114
115
116
117
118
  `path` varchar(255) NOT NULL DEFAULT '',
  `name` varchar(255) NOT NULL DEFAULT '',
  `category` varchar(255) NOT NULL DEFAULT '',
  `version` varchar(20) NOT NULL DEFAULT '',
  `release` int(4) NOT NULL DEFAULT '0',
  `package_url` TEXT,
119
120
121
122
123
124
125
126
127
128
129
130
  `package_status` int(1) NOT NULL DEFAULT '2',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `aps_settings`
--

CREATE TABLE IF NOT EXISTS `aps_settings` (
  `id` int(4) NOT NULL AUTO_INCREMENT,
131
132
  `name` varchar(255) NOT NULL DEFAULT '',
  `value` text,
133
134
135
136
137
138
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

139
140
141
142
143
--
-- Table structure for table `attempts_login`
--

CREATE TABLE `attempts_login` (
144
  `ip` varchar(39) NOT NULL DEFAULT '',
145
146
147
148
149
150
151
152
153
  `times` int(11) DEFAULT NULL,
  `login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;

-- --------------------------------------------------------

--
-- Table structure for table `client`
--
tbrehm's avatar
tbrehm committed
154
155

CREATE TABLE `client` (
156
157
158
159
160
161
162
  `client_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  `company_name` varchar(64) DEFAULT NULL,
163
  `company_id` varchar(255) DEFAULT NULL,
164
  `gender` enum('','m','f') NOT NULL DEFAULT '',
165
  `contact_firstname` varchar( 64 ) NOT NULL DEFAULT '',
166
167
168
169
170
171
172
173
174
175
176
177
  `contact_name` varchar(64) DEFAULT NULL,
  `customer_no` varchar(64) DEFAULT NULL,
  `vat_id` varchar(64) DEFAULT NULL,
  `street` varchar(255) DEFAULT NULL,
  `zip` varchar(32) DEFAULT NULL,
  `city` varchar(64) DEFAULT NULL,
  `state` varchar(32) DEFAULT NULL,
  `country` char(2) DEFAULT NULL,
  `telephone` varchar(32) DEFAULT NULL,
  `mobile` varchar(32) DEFAULT NULL,
  `fax` varchar(32) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
178
  `internet` varchar(255) NOT NULL DEFAULT '',
179
  `icq` varchar(16) DEFAULT NULL,
tbrehm's avatar
tbrehm committed
180
  `notes` text,
181
  `bank_account_owner` varchar(255) DEFAULT NULL,
182
183
184
185
186
  `bank_account_number` varchar(255) DEFAULT NULL,
  `bank_code` varchar(255) DEFAULT NULL,
  `bank_name` varchar(255) DEFAULT NULL,
  `bank_account_iban` varchar(255) DEFAULT NULL,
  `bank_account_swift` varchar(255) DEFAULT NULL,
187
  `paypal_email` varchar(255) DEFAULT NULL,
188
  `default_mailserver` int(11) unsigned NOT NULL DEFAULT '1',
189
  `mail_servers` text,
190
191
192
193
194
195
196
197
198
199
200
201
202
203
  `limit_maildomain` int(11) NOT NULL DEFAULT '-1',
  `limit_mailbox` int(11) NOT NULL DEFAULT '-1',
  `limit_mailalias` int(11) NOT NULL DEFAULT '-1',
  `limit_mailaliasdomain` int(11) NOT NULL DEFAULT '-1',
  `limit_mailforward` int(11) NOT NULL DEFAULT '-1',
  `limit_mailcatchall` int(11) NOT NULL DEFAULT '-1',
  `limit_mailrouting` int(11) NOT NULL DEFAULT '0',
  `limit_mailfilter` int(11) NOT NULL DEFAULT '-1',
  `limit_fetchmail` int(11) NOT NULL DEFAULT '-1',
  `limit_mailquota` int(11) NOT NULL DEFAULT '-1',
  `limit_spamfilter_wblist` int(11) NOT NULL DEFAULT '0',
  `limit_spamfilter_user` int(11) NOT NULL DEFAULT '0',
  `limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0',
  `default_webserver` int(11) unsigned NOT NULL DEFAULT '1',
204
  `web_servers` text,
tbrehm's avatar
tbrehm committed
205
  `limit_web_ip` text,
206
207
  `limit_web_domain` int(11) NOT NULL DEFAULT '-1',
  `limit_web_quota` int(11) NOT NULL DEFAULT '-1',
208
  `web_php_options` varchar(255) NOT NULL DEFAULT 'no,fast-cgi,mod,php-fpm',
mcramer's avatar
mcramer committed
209
210
211
212
213
214
215
216
217
  `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_perl` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ruby` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_python` enum('n','y') NOT NULL DEFAULT 'n',
  `force_suexec` enum('n','y') NOT NULL DEFAULT 'y',
  `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n',
Marius Burkard's avatar
Marius Burkard committed
218
  `limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n',
219
220
221
222
  `limit_web_subdomain` int(11) NOT NULL DEFAULT '-1',
  `limit_web_aliasdomain` int(11) NOT NULL DEFAULT '-1',
  `limit_ftp_user` int(11) NOT NULL DEFAULT '-1',
  `limit_shell_user` int(11) NOT NULL DEFAULT '0',
tbrehm's avatar
tbrehm committed
223
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no,jailkit,ssh-chroot',
224
  `limit_webdav_user` int(11) NOT NULL DEFAULT '0',
225
  `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y',
Marius Burkard's avatar
Marius Burkard committed
226
  `limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
227
  `limit_aps` int(11) NOT NULL DEFAULT '-1',
228
  `default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
229
  `db_servers` text,
230
  `limit_dns_zone` int(11) NOT NULL DEFAULT '-1',
231
  `default_slave_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
232
233
234
  `limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1',
  `limit_dns_record` int(11) NOT NULL DEFAULT '-1',
  `default_dbserver` int(11) NOT NULL DEFAULT '1',
235
  `dns_servers` text,
236
  `limit_database` int(11) NOT NULL DEFAULT '-1',
Florian Schaal's avatar
Florian Schaal committed
237
  `limit_database_user` int(11) NOT NULL DEFAULT '-1',
238
  `limit_database_quota` int(11) NOT NULL default '-1',
239
240
241
242
243
  `limit_cron` int(11) NOT NULL DEFAULT '0',
  `limit_cron_type` enum('url','chrooted','full') NOT NULL DEFAULT 'url',
  `limit_cron_frequency` int(11) NOT NULL DEFAULT '5',
  `limit_traffic_quota` int(11) NOT NULL DEFAULT '-1',
  `limit_client` int(11) NOT NULL DEFAULT '0',
244
  `limit_domainmodule` int(11) NOT NULL DEFAULT '0',
245
246
247
248
249
250
  `parent_client_id` int(11) unsigned NOT NULL DEFAULT '0',
  `username` varchar(64) DEFAULT NULL,
  `password` varchar(64) DEFAULT NULL,
  `language` char(2) NOT NULL DEFAULT 'en',
  `usertheme` varchar(32) NOT NULL DEFAULT 'default',
  `template_master` int(11) unsigned NOT NULL DEFAULT '0',
251
  `template_additional` text,
tbrehm's avatar
tbrehm committed
252
  `created_at` bigint(20) DEFAULT NULL,
253
254
  `locked` enum('n','y') NOT NULL DEFAULT 'n',
  `canceled` enum('n','y') NOT NULL DEFAULT 'n',
255
  `can_use_api` enum('n','y') NOT NULL DEFAULT 'n',
256
  `tmp_data` mediumblob,
257
258
  `id_rsa` varchar(2000) NOT NULL DEFAULT '',
  `ssh_rsa` varchar(600) NOT NULL DEFAULT '',
259
  `customer_no_template` varchar(255) DEFAULT 'R[CLIENTID]C[CUSTOMER_NO]',
260
261
  `customer_no_start` int(11) NOT NULL DEFAULT '1',
  `customer_no_counter` int(11) NOT NULL DEFAULT '0',
262
  `added_date` date NULL DEFAULT NULL,
263
  `added_by` varchar(255) DEFAULT NULL,
264
265
266
  `validation_status` enum('accept','review','reject') NOT NULL DEFAULT 'accept',
  `risk_score` int(10) unsigned NOT NULL DEFAULT '0',
  `activation_code` varchar(10) NOT NULL DEFAULT '',
267
268
  PRIMARY KEY (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
269
270
271

-- --------------------------------------------------------

272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
--
-- Table structure for table `client_circle`
--

CREATE TABLE `client_circle` (
  `circle_id` int(11) NOT NULL AUTO_INCREMENT,
  `sys_userid` int(11) NOT NULL DEFAULT '0',
  `sys_groupid` int(11) NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  `circle_name` varchar(64) DEFAULT NULL,
  `client_ids` text,
  `description` text,
  `active` enum('n','y') NOT NULL default 'y',
  PRIMARY KEY (`circle_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

292
-- 
tbrehm's avatar
tbrehm committed
293
-- Table structure for table  `client_template`
294
-- 
tbrehm's avatar
tbrehm committed
295
296
297
298
299
300
301

CREATE TABLE `client_template` (
  `template_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
302
  `sys_perm_other` varchar(5) default NULL,
303
  `template_name` varchar(64) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
304
  `template_type` varchar(1) NOT NULL default 'm',
305
  `mail_servers` text,
tbrehm's avatar
tbrehm committed
306
307
308
309
310
311
312
313
314
315
316
317
318
  `limit_maildomain` int(11) NOT NULL default '-1',
  `limit_mailbox` int(11) NOT NULL default '-1',
  `limit_mailalias` int(11) NOT NULL default '-1',
  `limit_mailaliasdomain` int(11) NOT NULL default '-1',
  `limit_mailforward` int(11) NOT NULL default '-1',
  `limit_mailcatchall` int(11) NOT NULL default '-1',
  `limit_mailrouting` int(11) NOT NULL default '0',
  `limit_mailfilter` int(11) NOT NULL default '-1',
  `limit_fetchmail` int(11) NOT NULL default '-1',
  `limit_mailquota` int(11) NOT NULL default '-1',
  `limit_spamfilter_wblist` int(11) NOT NULL default '0',
  `limit_spamfilter_user` int(11) NOT NULL default '0',
  `limit_spamfilter_policy` int(11) NOT NULL default '0',
319
  `web_servers` text,
tbrehm's avatar
tbrehm committed
320
321
322
  `limit_web_ip` text,
  `limit_web_domain` int(11) NOT NULL default '-1',
  `limit_web_quota` int(11) NOT NULL default '-1',
323
  `web_php_options` varchar(255) NOT NULL DEFAULT 'no',
mcramer's avatar
mcramer committed
324
325
326
327
328
329
330
331
332
  `limit_cgi` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ssi` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_perl` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ruby` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_python` enum('n','y') NOT NULL DEFAULT 'n',
  `force_suexec` enum('n','y') NOT NULL DEFAULT 'y',
  `limit_hterror` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_wildcard` enum('n','y') NOT NULL DEFAULT 'n',
  `limit_ssl` enum('n','y') NOT NULL DEFAULT 'n',
Marius Burkard's avatar
Marius Burkard committed
333
  `limit_ssl_letsencrypt` enum('n','y') NOT NULL DEFAULT 'n',
tbrehm's avatar
tbrehm committed
334
335
336
337
  `limit_web_subdomain` int(11) NOT NULL default '-1',
  `limit_web_aliasdomain` int(11) NOT NULL default '-1',
  `limit_ftp_user` int(11) NOT NULL default '-1',
  `limit_shell_user` int(11) NOT NULL default '0',
338
  `ssh_chroot` varchar(255) NOT NULL DEFAULT 'no',
tbrehm's avatar
tbrehm committed
339
  `limit_webdav_user` int(11) NOT NULL default '0',
340
  `limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y',
Marius Burkard's avatar
Marius Burkard committed
341
  `limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
342
  `limit_aps` int(11) NOT NULL DEFAULT '-1',
343
  `dns_servers` text,
tbrehm's avatar
tbrehm committed
344
  `limit_dns_zone` int(11) NOT NULL default '-1',
345
  `default_slave_dnsserver` int(11) NOT NULL DEFAULT '0',
tbrehm's avatar
tbrehm committed
346
347
  `limit_dns_slave_zone` int(11) NOT NULL default '-1',
  `limit_dns_record` int(11) NOT NULL default '-1',
348
  `db_servers` text,
tbrehm's avatar
tbrehm committed
349
  `limit_database` int(11) NOT NULL default '-1',
Florian Schaal's avatar
Florian Schaal committed
350
  `limit_database_user` int(11) NOT NULL DEFAULT '-1',
351
  `limit_database_quota` int(11) NOT NULL default '-1',
tbrehm's avatar
tbrehm committed
352
353
354
355
356
  `limit_cron` int(11) NOT NULL default '0',
  `limit_cron_type` enum('url','chrooted','full') NOT NULL default 'url',
  `limit_cron_frequency` int(11) NOT NULL default '5',
  `limit_traffic_quota` int(11) NOT NULL default '-1',
  `limit_client` int(11) NOT NULL default '0',
357
  `limit_domainmodule` int(11) NOT NULL DEFAULT '0',
tbrehm's avatar
tbrehm committed
358
  PRIMARY KEY  (`template_id`)
359
360
361
362
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

363
364
365
366
367
368
369
370
371
372
373
374
375
-- 
-- Table structure for table  `client_template_assigned`
-- 

CREATE TABLE `client_template_assigned` (
  `assigned_template_id` bigint(20) NOT NULL auto_increment,
  `client_id` bigint(11) NOT NULL DEFAULT '0',
  `client_template_id` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`assigned_template_id`),
  KEY `client_id` (`client_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------

376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
--
-- Table structure for table `invoice_message_template`
--

CREATE TABLE `client_message_template` (
  `client_message_template_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `sys_userid` int(11) NOT NULL DEFAULT '0',
  `sys_groupid` int(11) NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  `template_type` varchar(255) DEFAULT NULL,
  `template_name` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `message` text,
  PRIMARY KEY (`client_message_template_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `invoice_message_template`
--

-- --------------------------------------------------------

400
401
402
--
-- Table structure for table `country`
--
tbrehm's avatar
tbrehm committed
403

404
CREATE TABLE `country` (
405
406
407
  `iso` char(2) NOT NULL DEFAULT '',
  `name` varchar(64) NOT NULL DEFAULT '',
  `printable_name` varchar(64) NOT NULL DEFAULT '',
408
409
  `iso3` char(3) DEFAULT NULL,
  `numcode` smallint(6) DEFAULT NULL,
Marius Cramer's avatar
Marius Cramer committed
410
  `eu` enum('n','y') NOT NULL DEFAULT 'n',
411
412
  PRIMARY KEY (`iso`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
tbrehm's avatar
tbrehm committed
413
414
415

-- --------------------------------------------------------

416
-- 
tbrehm's avatar
tbrehm committed
417
-- Table structure for table  `cron`
418
-- 
tbrehm's avatar
tbrehm committed
419
420
421
422
423
424
425
426
427
428
CREATE TABLE `cron` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NULL default NULL,
  `sys_perm_group` varchar(5) NULL default NULL,
  `sys_perm_other` varchar(5) NULL default NULL,
  `server_id` int(11) unsigned NOT NULL default '0',
  `parent_domain_id` int(11) unsigned NOT NULL default '0',
  `type` enum('url','chrooted','full') NOT NULL default 'url',
429
  `command` TEXT,
tbrehm's avatar
tbrehm committed
430
431
432
433
434
  `run_min` varchar(100) NULL,
  `run_hour` varchar(100) NULL,
  `run_mday` varchar(100) NULL,
  `run_month` varchar(100) NULL,
  `run_wday` varchar(100) NULL,
435
  `log` enum('n','y') NOT NULL default 'n',
tbrehm's avatar
tbrehm committed
436
437
  `active` enum('n','y') NOT NULL default 'y',
  PRIMARY KEY  (`id`)
438
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
439
440
441

-- --------------------------------------------------------

442
-- 
443
-- Table structure for table  `directive_snippets`
444
-- 
445
446
447
448
449
450
451
452
453
454
455

CREATE TABLE IF NOT EXISTS `directive_snippets` (
  `directive_snippets_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `snippet` mediumtext,
456
  `customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n',
Marius Cramer's avatar
Marius Cramer committed
457
  `required_php_snippets` varchar(255) NOT NULL DEFAULT '',
458
  `active` enum('n','y') NOT NULL DEFAULT 'y',
459
  `master_directive_snippets_id` int(11) unsigned NOT NULL DEFAULT '0',
460
461
462
463
464
  PRIMARY KEY (`directive_snippets_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

465
-- 
tbrehm's avatar
tbrehm committed
466
-- Table structure for table  `dns_rr`
467
-- 
tbrehm's avatar
tbrehm committed
468
469
470

CREATE TABLE `dns_rr` (
  `id` int(11) unsigned NOT NULL auto_increment,
471
472
473
474
475
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_group` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
476
  `server_id` int(11) NOT NULL default '1',
477
  `zone` int(11) unsigned NOT NULL DEFAULT '0',
478
  `name` varchar(255) NOT NULL DEFAULT '',
479
  `type` enum('A','AAAA','ALIAS','CAA','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') default NULL,
480
  `data` TEXT NOT NULL,
tbrehm's avatar
tbrehm committed
481
  `aux` int(11) unsigned NOT NULL default '0',
Marius Cramer's avatar
Marius Cramer committed
482
  `ttl` int(11) unsigned NOT NULL default '3600',
tbrehm's avatar
tbrehm committed
483
484
485
486
  `active` enum('N','Y') NOT NULL default 'Y',
  `stamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `serial` int(10) unsigned default NULL,
  PRIMARY KEY  (`id`),
Till Brehm's avatar
Till Brehm committed
487
  KEY `rr` (`zone`,`type`,`name`)
488
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
489

490
491
492
493
494
495
496
-- --------------------------------------------------------

-- 
-- Table structure for table  `dns_ssl_ca`
-- 

CREATE TABLE IF NOT EXISTS `dns_ssl_ca` (
Florian Schaal's avatar
Florian Schaal committed
497
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
498
499
500
501
502
503
504
505
506
507
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_group` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
  `active` enum('N','Y') NOT NULL DEFAULT 'N',
  `ca_name` varchar(255) NOT NULL DEFAULT '',
  `ca_issue` varchar(255) NOT NULL DEFAULT '',
  `ca_wildcard` enum('Y','N') NOT NULL DEFAULT 'N',
  `ca_iodef` text NOT NULL,
Florian Schaal's avatar
Florian Schaal committed
508
  `ca_critical` tinyint(1) NOT NULL DEFAULT '0',
Florian Schaal's avatar
Florian Schaal committed
509
510
  PRIMARY KEY (`id`),
  UNIQUE KEY (`ca_issue`)
Florian Schaal's avatar
Florian Schaal committed
511
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
512
513

INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `active`, `ca_name`, `ca_issue`, `ca_wildcard`, `ca_iodef`, `ca_critical`) VALUES
Florian Schaal's avatar
Florian Schaal committed
514
515
516
517
518
519
520
521
522
523
524
525
526
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'AC Camerfirma', 'camerfirma.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'ACCV', 'accv.es', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Actalis', 'actalis.it', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Amazon', 'amazon.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Asseco', 'certum.pl', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Buypass', 'buypass.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CA Disig', 'disig.sk', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CATCert', 'aoc.cat', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certinomis', 'www.certinomis.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Certizen', 'hongkongpost.gov.hk', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'certSIGN', 'certsign.ro', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'CFCA', 'cfca.com.cn', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Chunghwa Telecom', 'cht.com.tw', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
527
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Comodo', 'comodo.com', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
528
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'D-TRUST', 'd-trust.net', 'Y', '', 0),
529
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DigiCert', 'digicert.com', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
530
531
532
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'DocuSign', 'docusign.fr', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'e-tugra', 'e-tugra.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'EDICOM', 'edicomgroup.com', 'Y', '', 0),
533
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Entrust', 'entrust.net', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
534
535
536
537
538
539
540
541
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Firmaprofesional', 'firmaprofesional.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'FNMT', 'fnmt.es', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GlobalSign', 'globalsign.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GoDaddy', 'godaddy.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Google Trust Services', 'pki.goog', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'GRCA', 'gca.nat.gov.tw', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'HARICA', 'harica.gr', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'IdenTrust', 'identrust.com', 'Y', '', 0),
542
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Izenpe', 'izenpe.com', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
543
544
545
546
547
548
549
550
551
552
553
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Kamu SM', 'kamusm.gov.tr', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Let''s Encrypt', 'letsencrypt.org', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Microsec e-Szigno', 'e-szigno.hu', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'NetLock', 'netlock.hu', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PKIoverheid', 'www.pkioverheid.nl', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'PROCERT', 'procert.net.ve', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'QuoVadis', 'quovadisglobal.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SECOM', 'secomtrust.net', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Sertifitseerimiskeskuse', 'sk.ee', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'StartCom', 'startcomca.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'SwissSign', 'swisssign.com', 'Y', '', 0),
554
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Symantec / Thawte / GeoTrust', 'symantec.com', 'Y', '', 0),
Florian Schaal's avatar
Florian Schaal committed
555
556
557
558
559
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'T-Systems', 'telesec.de', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Telia', 'telia.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Trustwave', 'trustwave.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'Web.com', 'web.com', 'Y', '', 0),
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WISeKey', 'wisekey.com', 'Y', '', 0),
560
561
562
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WoSign', 'wosign.com', 'Y', '', 0);


tbrehm's avatar
tbrehm committed
563
564
-- --------------------------------------------------------

565
566
567
--
-- Table structure for table  `dns_slave`
--
tbrehm's avatar
tbrehm committed
568

569
CREATE TABLE `dns_slave` (
tbrehm's avatar
tbrehm committed
570
  `id` int(10) unsigned NOT NULL auto_increment,
571
572
573
574
575
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_group` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
576
  `server_id` int(11) NOT NULL default '1',
577
578
579
580
  `origin` varchar(255) NOT NULL DEFAULT '',
  `ns` varchar(255) NOT NULL DEFAULT '',
  `active` enum('N','Y') NOT NULL DEFAULT 'N',
  `xfer` varchar(255) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
581
  PRIMARY KEY  (`id`),
582
  UNIQUE KEY `slave` (`origin`,`server_id`),
tbrehm's avatar
tbrehm committed
583
  KEY `active` (`active`)
584
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
585
586
587

-- --------------------------------------------------------

588
-- 
589
-- Table structure for table  `dns_soa`
590
-- 
tbrehm's avatar
tbrehm committed
591

592
CREATE TABLE `dns_soa` (
tbrehm's avatar
tbrehm committed
593
  `id` int(10) unsigned NOT NULL auto_increment,
594
595
596
597
598
  `sys_userid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_groupid` int(11) unsigned NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_group` varchar(5) NOT NULL DEFAULT '',
  `sys_perm_other` varchar(5) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
599
  `server_id` int(11) NOT NULL default '1',
600
601
602
  `origin` varchar(255) NOT NULL DEFAULT '',
  `ns` varchar(255) NOT NULL DEFAULT '',
  `mbox` varchar(255) NOT NULL DEFAULT '',
603
604
605
606
  `serial` int(11) unsigned NOT NULL default '1',
  `refresh` int(11) unsigned NOT NULL default '28800',
  `retry` int(11) unsigned NOT NULL default '7200',
  `expire` int(11) unsigned NOT NULL default '604800',
Marius Cramer's avatar
Marius Cramer committed
607
608
  `minimum` int(11) unsigned NOT NULL default '3600',
  `ttl` int(11) unsigned NOT NULL default '3600',
609
  `active` enum('N','Y') NOT NULL DEFAULT 'N',
A. Täffner's avatar
A. Täffner committed
610
611
  `status` enum('OK','ERROR','PENDING') NOT NULL DEFAULT 'OK',
  `status_txt` text,
612
  `xfer` varchar(255) NOT NULL DEFAULT '',
613
614
  `also_notify` varchar(255) default NULL,
  `update_acl` varchar(255) default NULL,
615
  `dnssec_initialized` ENUM('Y','N') NOT NULL DEFAULT 'N',
A. Täffner's avatar
A. Täffner committed
616
  `dnssec_wanted` ENUM('Y','N') NOT NULL DEFAULT 'N',
617
  `dnssec_last_signed` BIGINT NOT NULL DEFAULT '0',
618
  `dnssec_info` TEXT NULL,
tbrehm's avatar
tbrehm committed
619
620
621
  PRIMARY KEY  (`id`),
  UNIQUE KEY `origin` (`origin`),
  KEY `active` (`active`)
622
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
623
624
625

-- --------------------------------------------------------

626
-- 
tbrehm's avatar
tbrehm committed
627
-- Table structure for table  `dns_template`
628
-- 
tbrehm's avatar
tbrehm committed
629
630
631
632
633
634
635
636
637
638
639
640
641

CREATE TABLE `dns_template` (
  `template_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
  `sys_perm_other` varchar(5) default NULL,
  `name` varchar(64) default NULL,
  `fields` varchar(255) default NULL,
  `template` text,
  `visible` enum('N','Y') NOT NULL default 'Y',
  PRIMARY KEY  (`template_id`)
642
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
643
644

--
645
-- Table structure for table  `domain`
tbrehm's avatar
tbrehm committed
646
647
648
649
650
651
652
653
654
655
656
657
--

CREATE TABLE `domain` (
  `domain_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `domain` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`domain_id`),
  UNIQUE KEY `domain` (`domain`)
658
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ;
tbrehm's avatar
tbrehm committed
659
660
661

-- --------------------------------------------------------

662
-- 
tbrehm's avatar
tbrehm committed
663
-- Table structure for table  `firewall`
664
-- 
tbrehm's avatar
tbrehm committed
665
666
667
668
669
670
671
672
673
674
675
676
677

CREATE TABLE `firewall` (
  `firewall_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
  `sys_perm_other` varchar(5) default NULL,
  `server_id` int(11) unsigned NOT NULL default '0',
  `tcp_port` varchar(255) default NULL,
  `udp_port` varchar(255) default NULL,
  `active` enum('n','y') NOT NULL default 'y',
  PRIMARY KEY  (`firewall_id`)
678
679
680
681
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

682
-- 
tbrehm's avatar
tbrehm committed
683
-- Table structure for table  `ftp_user`
684
-- 
tbrehm's avatar
tbrehm committed
685
686
687
688
689
690
691
692
693
694
695

CREATE TABLE `ftp_user` (
  `ftp_user_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
  `sys_perm_other` varchar(5) default NULL,
  `server_id` int(11) unsigned NOT NULL default '0',
  `parent_domain_id` int(11) unsigned NOT NULL default '0',
  `username` varchar(64) default NULL,
696
  `username_prefix` varchar(50) NOT NULL default '',
tbrehm's avatar
tbrehm committed
697
698
699
700
701
702
703
704
705
706
707
  `password` varchar(64) default NULL,
  `quota_size` bigint(20) NOT NULL default '-1',
  `active` enum('n','y') NOT NULL default 'y',
  `uid` varchar(64) default NULL,
  `gid` varchar(64) default NULL,
  `dir` varchar(255) default NULL,
  `quota_files` bigint(20) NOT NULL default '-1',
  `ul_ratio` int(11) NOT NULL default '-1',
  `dl_ratio` int(11) NOT NULL default '-1',
  `ul_bandwidth` int(11) NOT NULL default '-1',
  `dl_bandwidth` int(11) NOT NULL default '-1',
708
  `expires` datetime NULL DEFAULT NULL,
709
710
  `user_type` set('user','system') NOT NULL DEFAULT 'user',
  `user_config` text,
tbrehm's avatar
tbrehm committed
711
712
713
714
715
  PRIMARY KEY  (`ftp_user_id`),
  KEY `active` (`active`),
  KEY `server_id` (`server_id`),
  KEY `username` (`username`),
  KEY `quota_files` (`quota_files`)
716
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
Cédric's avatar
Cédric committed
717
718
719
720
721
722
723
724
725
726
727
728

-- --------------------------------------------------------

-- 
-- Table structure for table  `ftp_traffic`
-- 

CREATE TABLE `ftp_traffic` (
  `hostname` varchar(255) NOT NULL,
  `traffic_date` date NOT NULL,
  `in_bytes` bigint(32) unsigned NOT NULL,
  `out_bytes` bigint(32) unsigned NOT NULL,
729
  UNIQUE KEY (`hostname`,`traffic_date`)
Cédric's avatar
Cédric committed
730
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768

-- --------------------------------------------------------

--
-- Table structure for table `help_faq`
--

CREATE TABLE `help_faq` (
  `hf_id` int(11) NOT NULL AUTO_INCREMENT,
  `hf_section` int(11) DEFAULT NULL,
  `hf_order` int(11) DEFAULT '0',
  `hf_question` text,
  `hf_answer` text,
  `sys_userid` int(11) DEFAULT NULL,
  `sys_groupid` int(11) DEFAULT NULL,
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`hf_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- Table structure for table `help_faq_sections`
--

CREATE TABLE `help_faq_sections` (
  `hfs_id` int(11) NOT NULL AUTO_INCREMENT,
  `hfs_name` varchar(255) DEFAULT NULL,
  `hfs_order` int(11) DEFAULT '0',
  `sys_userid` int(11) DEFAULT NULL,
  `sys_groupid` int(11) DEFAULT NULL,
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  PRIMARY KEY (`hfs_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
769
770
771

-- --------------------------------------------------------

latham's avatar
latham committed
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
-- Table structure for table `iptables`
--

DROP TABLE IF EXISTS `iptables`;
CREATE TABLE `iptables` (
  `iptables_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `server_id` int(10) unsigned NOT NULL DEFAULT '0',
  `table` varchar(10) DEFAULT NULL COMMENT 'INPUT OUTPUT FORWARD',
  `source_ip` varchar(16) DEFAULT NULL,
  `destination_ip` varchar(16) DEFAULT NULL,
  `protocol` varchar(10) DEFAULT 'TCP' COMMENT 'TCP UDP GRE',
  `singleport` varchar(10) DEFAULT NULL,
  `multiport` varchar(40) DEFAULT NULL,
  `state` varchar(20) DEFAULT NULL COMMENT 'NEW ESTABLISHED RECNET etc',
  `target` varchar(10) DEFAULT NULL COMMENT 'ACCEPT DROP REJECT LOG',
  `active` enum('n','y') NOT NULL DEFAULT 'y',
  PRIMARY KEY (`iptables_id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

793
-- 
tbrehm's avatar
tbrehm committed
794
-- Table structure for table  `mail_access`
795
-- 
tbrehm's avatar
tbrehm committed
796
797
798
799
800
801
802
803
804

CREATE TABLE `mail_access` (
  `access_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `server_id` int(11) NOT NULL default '0',
805
806
807
  `source` varchar(255) NOT NULL DEFAULT '',
  `access` varchar(255) NOT NULL DEFAULT '',
  `type` set('recipient','sender','client') NOT NULL DEFAULT 'recipient',
tbrehm's avatar
tbrehm committed
808
809
810
  `active` enum('n','y') NOT NULL default 'y',
  PRIMARY KEY  (`access_id`),
  KEY `server_id` (`server_id`,`source`)
811
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
812
813
814

-- --------------------------------------------------------

815
816
817
818
819
820
--
-- Table structure for table  `mail_backup`
--

CREATE TABLE `mail_backup` (
  `backup_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
821
822
823
  `server_id` int(10) unsigned NOT NULL DEFAULT '0',
  `parent_domain_id` int(10) unsigned NOT NULL DEFAULT '0',
  `mailuser_id` int(10) unsigned NOT NULL DEFAULT '0',
824
  `backup_mode` varchar(64) NOT NULL DEFAULT  '',
825
826
  `tstamp` int(10) unsigned NOT NULL DEFAULT '0',
  `filename` varchar(255) NOT NULL DEFAULT '',
827
  `filesize` VARCHAR(20) NOT NULL DEFAULT '',
828
829
830
831
832
  PRIMARY KEY (`backup_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

833
-- 
tbrehm's avatar
tbrehm committed
834
-- Table structure for table  `mail_content_filter`
835
-- 
tbrehm's avatar
tbrehm committed
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850

CREATE TABLE `mail_content_filter` (
  `content_filter_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
  `sys_perm_other` varchar(5) default NULL,
  `server_id` int(11) NOT NULL default '0',
  `type` varchar(255) default NULL,
  `pattern` varchar(255) default NULL,
  `data` varchar(255) default NULL,
  `action` varchar(255) default NULL,
  `active` varchar(255) NOT NULL default 'y',
  PRIMARY KEY  (`content_filter_id`)
851
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
852
853
854

-- --------------------------------------------------------

855
-- 
tbrehm's avatar
tbrehm committed
856
-- Table structure for table  `mail_domain`
857
-- 
tbrehm's avatar
tbrehm committed
858
859
860
861
862
863
864
865
866
867

CREATE TABLE `mail_domain` (
  `domain_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `server_id` int(11) unsigned NOT NULL default '0',
  `domain` varchar(255) NOT NULL default '',
868
  `dkim` ENUM( 'n', 'y' ) NOT NULL default 'n',
869
  `dkim_selector` varchar(63) NOT NULL DEFAULT 'default',
870
871
  `dkim_private` mediumtext NULL,
  `dkim_public` mediumtext NULL,
872
  `active` enum('n','y') NOT NULL DEFAULT 'n',
tbrehm's avatar
tbrehm committed
873
874
875
  PRIMARY KEY  (`domain_id`),
  KEY `server_id` (`server_id`,`domain`),
  KEY `domain_active` (`domain`,`active`)
876
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
877
878
879

-- --------------------------------------------------------

880
-- 
tbrehm's avatar
tbrehm committed
881
-- Table structure for table  `mail_forwarding`
882
-- 
tbrehm's avatar
tbrehm committed
883
884
885
886
887
888
889
890
891

CREATE TABLE `mail_forwarding` (
  `forwarding_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `server_id` int(11) unsigned NOT NULL default '0',
892
  `source` varchar(255) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
893
894
  `destination` text,
  `type` enum('alias','aliasdomain','forward','catchall') NOT NULL default 'alias',
895
  `active` enum('n','y') NOT NULL DEFAULT 'n',
896
  `allow_send_as` ENUM('n','y') NOT NULL DEFAULT 'n',
897
  `greylisting` enum('n','y' ) NOT NULL DEFAULT 'n',
tbrehm's avatar
tbrehm committed
898
899
900
  PRIMARY KEY  (`forwarding_id`),
  KEY `server_id` (`server_id`,`source`),
  KEY `type` (`type`)
901
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
902
903
904

-- --------------------------------------------------------

905
-- 
tbrehm's avatar
tbrehm committed
906
-- Table structure for table  `mail_get`
907
-- 
tbrehm's avatar
tbrehm committed
908
909
910
911
912
913
914
915
916
917
918
919
920
921

CREATE TABLE `mail_get` (
  `mailget_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) default NULL,
  `sys_perm_group` varchar(5) default NULL,
  `sys_perm_other` varchar(5) default NULL,
  `server_id` int(11) unsigned NOT NULL default '0',
  `type` varchar(255) default NULL,
  `source_server` varchar(255) default NULL,
  `source_username` varchar(255) default NULL,
  `source_password` varchar(64) default NULL,
  `source_delete` varchar(255) NOT NULL default 'y',
922
  `source_read_all` varchar(255) NOT NULL default 'y',
tbrehm's avatar
tbrehm committed
923
924
925
  `destination` varchar(255) default NULL,
  `active` varchar(255) NOT NULL default 'y',
  PRIMARY KEY  (`mailget_id`)
926
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945

-- --------------------------------------------------------

--
-- Table structure for Table `mail_relay_recipient`
--

CREATE TABLE IF NOT EXISTS `mail_relay_recipient` (
  `relay_recipient_id` bigint(20) NOT NULL AUTO_INCREMENT,
  `sys_userid` int(11) NOT NULL DEFAULT '0',
  `sys_groupid` int(11) NOT NULL DEFAULT '0',
  `sys_perm_user` varchar(5) DEFAULT NULL,
  `sys_perm_group` varchar(5) DEFAULT NULL,
  `sys_perm_other` varchar(5) DEFAULT NULL,
  `server_id` int(11) NOT NULL DEFAULT '0',
  `source` varchar(255) DEFAULT NULL,
  `access` varchar(255) NOT NULL DEFAULT 'OK',
  `active` varchar(255) NOT NULL DEFAULT 'y',
  PRIMARY KEY (`relay_recipient_id`)
946
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
947
948
949

-- --------------------------------------------------------

950
-- 
tbrehm's avatar
tbrehm committed
951
-- Table structure for table  `mail_traffic`
952
-- 
tbrehm's avatar
tbrehm committed
953
954
955

CREATE TABLE `mail_traffic` (
  `traffic_id` int(11) unsigned NOT NULL auto_increment,
956
957
958
  `mailuser_id` int(11) unsigned NOT NULL DEFAULT '0',
  `month` char(7) NOT NULL DEFAULT '',
  `traffic` bigint(20) unsigned NOT NULL DEFAULT '0',
tbrehm's avatar
tbrehm committed
959
960
  PRIMARY KEY  (`traffic_id`),
  KEY `mailuser_id` (`mailuser_id`,`month`)
961
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
962
963
964

-- --------------------------------------------------------

965
-- 
tbrehm's avatar
tbrehm committed
966
-- Table structure for table  `mail_transport`
967
-- 
tbrehm's avatar
tbrehm committed
968
969
970
971
972
973
974
975
976
977

CREATE TABLE `mail_transport` (
  `transport_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `server_id` int(11) unsigned NOT NULL default '0',
  `domain` varchar(255) NOT NULL default '',
978
  `transport` varchar(255) NOT NULL DEFAULT '',
tbrehm's avatar
tbrehm committed
979
  `sort_order` int(11) unsigned NOT NULL default '5',
980
  `active` enum('n','y') NOT NULL DEFAULT 'n',
tbrehm's avatar
tbrehm committed
981
982
983
  PRIMARY KEY  (`transport_id`),
  KEY `server_id` (`server_id`,`transport`),
  KEY `server_id_2` (`server_id`,`domain`)
984
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
tbrehm's avatar
tbrehm committed
985
986
987

-- --------------------------------------------------------

988
-- 
tbrehm's avatar
tbrehm committed
989
-- Table structure for table  `mail_user`
990
-- 
tbrehm's avatar
tbrehm committed
991
992
993
994
995
996
997
998
999
1000

CREATE TABLE `mail_user` (
  `mailuser_id` int(11) unsigned NOT NULL auto_increment,
  `sys_userid` int(11) unsigned NOT NULL default '0',
  `sys_groupid` int(11) unsigned NOT NULL default '0',
  `sys_perm_user` varchar(5) NOT NULL default '',
  `sys_perm_group` varchar(5) NOT NULL default '',
  `sys_perm_other` varchar(5) NOT NULL default '',
  `server_id` int(11) unsigned NOT NULL default '0',
  `email` varchar(255) NOT NULL default '',