root/trunk/mail_system.sql

Revision 214, 11.6 kB (checked in by jonas, 15 months ago)

CpVES 0.10

Line 
1-- phpMyAdmin SQL Dump
2-- version 2.9.1.1-Debian-3
3-- http://www.phpmyadmin.net
4--
5-- Host: localhost
6-- Generation Time: Oct 11, 2007 at 09:17 PM
7-- Server version: 5.0.32
8-- PHP Version: 5.2.0-8+etch7
9--
10-- Database: `mail_system`
11--
12
13-- --------------------------------------------------------
14
15--
16-- Table structure for table `adm_users`
17--
18
19CREATE TABLE `adm_users` (
20  `id` int(11) NOT NULL auto_increment,
21  `username` varchar(200) collate utf8_unicode_ci NOT NULL default '',
22  `passwd` varchar(200) collate utf8_unicode_ci NOT NULL default '',
23  `access` tinyint(1) NOT NULL default '1',
24  `manager` tinyint(1) NOT NULL default '0',
25  `full_name` varchar(255) collate utf8_unicode_ci default NULL,
26  `cpasswd` varchar(255) character set utf8 NOT NULL default '',
27  `web_lang` varchar(14) collate utf8_unicode_ci NOT NULL,
28  PRIMARY KEY  (`id`),
29  UNIQUE KEY `id` (`id`)
30) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
31
32-- --------------------------------------------------------
33
34--
35-- Table structure for table `admin_access`
36--
37
38CREATE TABLE `admin_access` (
39  `id` int(11) NOT NULL auto_increment,
40  `email` int(11) NOT NULL default '0',
41  `domain` int(11) NOT NULL default '0',
42  PRIMARY KEY  (`id`)
43) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
44
45-- --------------------------------------------------------
46
47--
48-- Table structure for table `autoresponder`
49--
50
51CREATE TABLE `autoresponder` (
52  `id` int(11) NOT NULL auto_increment,
53  `esubject` varchar(100) collate utf8_unicode_ci NOT NULL default '',
54  `msg` text collate utf8_unicode_ci NOT NULL,
55  `active` enum('y','n') collate utf8_unicode_ci NOT NULL default 'y',
56  `email` int(11) NOT NULL default '0',
57  `times` char(1) collate utf8_unicode_ci NOT NULL default '1',
58  PRIMARY KEY  (`id`),
59  KEY `email` (`email`)
60) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
61
62-- --------------------------------------------------------
63
64--
65-- Table structure for table `autoresponder_disable`
66--
67
68CREATE TABLE `autoresponder_disable` (
69  `id` int(11) NOT NULL auto_increment,
70  `email` int(11) NOT NULL default '0',
71  `active` tinyint(1) NOT NULL default '1',
72  `a_date` timestamp NOT NULL default CURRENT_TIMESTAMP,
73  PRIMARY KEY  (`id`),
74  KEY `email` (`email`)
75) ENGINE=MyISAM DEFAULT CHARSET=utf8;
76
77-- --------------------------------------------------------
78
79--
80-- Table structure for table `autoresponder_recipient`
81--
82
83CREATE TABLE `autoresponder_recipient` (
84  `id` int(11) NOT NULL auto_increment,
85  `email` int(11) NOT NULL default '0',
86  `recip` varchar(250) NOT NULL default '',
87  PRIMARY KEY  (`id`),
88  KEY `email` (`email`)
89) ENGINE=MyISAM DEFAULT CHARSET=utf8;
90
91-- --------------------------------------------------------
92
93--
94-- Table structure for table `autoresponder_send`
95--
96
97CREATE TABLE `autoresponder_send` (
98  `id` int(11) NOT NULL auto_increment,
99  `email` int(11) NOT NULL default '0',
100  `efromto` varchar(255) collate utf8_unicode_ci NOT NULL default '',
101  PRIMARY KEY  (`id`),
102  KEY `efromto` (`efromto`),
103  KEY `in2` (`email`,`efromto`)
104) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
105
106-- --------------------------------------------------------
107
108--
109-- Table structure for table `autoresponder_xheader`
110--
111
112CREATE TABLE `autoresponder_xheader` (
113  `id` int(11) NOT NULL auto_increment,
114  `email` int(11) NOT NULL,
115  `xheader` varchar(255) NOT NULL,
116  `value` varchar(255) NOT NULL,
117  PRIMARY KEY  (`id`),
118  KEY `email` (`email`)
119) ENGINE=MyISAM DEFAULT CHARSET=utf8;
120
121-- --------------------------------------------------------
122
123--
124-- Table structure for table `domains`
125--
126
127CREATE TABLE `domains` (
128  `id` int(11) NOT NULL auto_increment,
129  `dnsname` varchar(255) collate utf8_unicode_ci NOT NULL default '',
130  `access` tinyint(1) NOT NULL default '0',
131  `p_imap` tinyint(1) default '1',
132  `p_pop3` tinyint(1) default '1',
133  `p_webmail` tinyint(1) default '1',
134  `max_email` int(11) NOT NULL default '0',
135  `max_forward` int(11) NOT NULL default '0',
136  `dnote` varchar(30) collate utf8_unicode_ci default NULL,
137  `p_spamassassin` tinyint(1) default '0',
138  `p_mailarchive` tinyint(1) default '0',
139  `p_bogofilter` tinyint(1) NOT NULL default '0',
140  `p_sa_wb_listing` tinyint(1) NOT NULL default '0',
141  `p_mailfilter` tinyint(1) NOT NULL default '0',
142  `p_spam_del` tinyint(1) NOT NULL default '0',
143  `enew` tinyint(1) NOT NULL default '1',
144  `p_sa_learn` tinyint(1) NOT NULL default '0',
145  `p_fetchmail` tinyint(1) NOT NULL default '0',
146  `p_webinterface` tinyint(1) NOT NULL default '1',
147  `p_autores_xheader` tinyint(1) NOT NULL default '0',
148  `p_check_polw` tinyint(1) NOT NULL default '1',
149  `p_check_grey` tinyint(1) NOT NULL default '0',
150  `p_mlists` tinyint(4) NOT NULL default '0',
151  `p_spam_fwd` tinyint(1) NOT NULL default '0',
152  PRIMARY KEY  (`id`),
153  UNIQUE KEY `dnsname_2` (`dnsname`)
154) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
155
156-- --------------------------------------------------------
157
158--
159-- Table structure for table `email_options`
160--
161
162CREATE TABLE `email_options` (
163  `id` int(11) NOT NULL auto_increment,
164  `email` int(11) NOT NULL default '0',
165  `conf` varchar(100) default NULL,
166  `options` varchar(100) default NULL,
167  `extra` varchar(100) default NULL,
168  PRIMARY KEY  (`id`),
169  KEY `conf` (`conf`)
170) ENGINE=MyISAM DEFAULT CHARSET=latin1;
171
172-- --------------------------------------------------------
173
174--
175-- Table structure for table `fetchmail`
176--
177
178CREATE TABLE `fetchmail` (
179  `id` int(11) NOT NULL auto_increment,
180  `email` int(11) NOT NULL default '0',
181  `server` varchar(255) NOT NULL default '',
182  `proto` tinyint(1) NOT NULL default '0',
183  `conn_type` tinyint(1) NOT NULL default '0',
184  `username` varchar(255) NOT NULL default '',
185  `password` varchar(255) NOT NULL default '',
186  `keep_mails` tinyint(1) NOT NULL default '0',
187  `active` tinyint(1) NOT NULL default '1',
188  PRIMARY KEY  (`id`),
189  KEY `email` (`email`),
190  KEY `active` (`active`)
191) ENGINE=MyISAM DEFAULT CHARSET=utf8;
192
193-- --------------------------------------------------------
194
195--
196-- Table structure for table `forwardings`
197--
198
199CREATE TABLE `forwardings` (
200  `id` int(11) NOT NULL auto_increment,
201  `domainid` int(11) NOT NULL default '0',
202  `efrom` varchar(255) collate utf8_unicode_ci NOT NULL default '',
203  `eto` text collate utf8_unicode_ci NOT NULL,
204  `access` tinyint(1) NOT NULL default '1',
205  `p_check_polw` tinyint(1) NOT NULL default '1',
206  `p_check_grey` tinyint(1) NOT NULL default '0',
207  PRIMARY KEY  (`id`),
208  UNIQUE KEY `efrom` (`efrom`)
209) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
210
211-- --------------------------------------------------------
212
213--
214-- Table structure for table `list_recp`
215--
216
217CREATE TABLE `list_recp` (
218  `id` int(11) NOT NULL auto_increment,
219  `recp` varchar(100) default NULL,
220  KEY `listID` (`id`)
221) ENGINE=MyISAM DEFAULT CHARSET=utf8;
222
223-- --------------------------------------------------------
224
225--
226-- Table structure for table `lists`
227--
228
229CREATE TABLE `lists` (
230  `id` int(11) NOT NULL auto_increment,
231  `domainid` int(11) NOT NULL,
232  `address` varchar(80) NOT NULL,
233  `access` tinyint(1) default '1',
234  `public` enum('y','n') NOT NULL,
235  PRIMARY KEY  (`id`),
236  KEY `second` (`address`,`access`)
237) ENGINE=MyISAM DEFAULT CHARSET=utf8;
238
239-- --------------------------------------------------------
240
241--
242-- Table structure for table `mailarchive`
243--
244
245CREATE TABLE `mailarchive` (
246  `id` int(11) NOT NULL auto_increment,
247  `email` int(11) NOT NULL default '0',
248  `folder` varchar(250) NOT NULL default '',
249  `adays` int(11) NOT NULL default '0',
250  `fname_month` tinyint(1) NOT NULL default '0',
251  `fname_year` tinyint(1) NOT NULL default '0',
252  `active` tinyint(1) NOT NULL default '0',
253  `mailsread` tinyint(1) NOT NULL default '0',
254  PRIMARY KEY  (`id`),
255  KEY `email` (`email`,`active`)
256) ENGINE=MyISAM DEFAULT CHARSET=utf8;
257
258-- --------------------------------------------------------
259
260--
261-- Table structure for table `mailfilter`
262--
263
264CREATE TABLE `mailfilter` (
265  `id` int(11) NOT NULL auto_increment,
266  `email` int(11) NOT NULL default '0',
267  `active` int(11) NOT NULL default '1',
268  `type` varchar(30) default NULL,
269  `filter` varchar(255) default NULL,
270  `prio` int(11) default NULL,
271  PRIMARY KEY  (`id`),
272  KEY `email` (`email`)
273) ENGINE=MyISAM DEFAULT CHARSET=utf8;
274
275-- --------------------------------------------------------
276
277--
278-- Table structure for table `sa_wb_listing`
279--
280
281CREATE TABLE `sa_wb_listing` (
282  `id` int(11) NOT NULL auto_increment,
283  `domainid` int(11) NOT NULL default '0',
284  `email` int(11) NOT NULL default '0',
285  `sa_from` varchar(250) NOT NULL default '',
286  `type` tinyint(1) NOT NULL default '1',
287  PRIMARY KEY  (`id`),
288  KEY `domainid` (`domainid`),
289  KEY `type` (`type`)
290) ENGINE=MyISAM DEFAULT CHARSET=utf8;
291
292-- --------------------------------------------------------
293
294--
295-- Table structure for table `spamassassin`
296--
297
298CREATE TABLE `spamassassin` (
299  `email` int(11) NOT NULL default '0',
300  `username` varchar(100) NOT NULL default '',
301  `preference` varchar(30) NOT NULL default '',
302  `value` varchar(100) NOT NULL default '',
303  `prefid` int(11) NOT NULL auto_increment,
304  PRIMARY KEY  (`prefid`),
305  KEY `username` (`username`),
306  KEY `preference` (`preference`)
307) ENGINE=MyISAM DEFAULT CHARSET=utf8;
308
309-- --------------------------------------------------------
310
311--
312-- Table structure for table `spamassassin_learn`
313--
314
315CREATE TABLE `spamassassin_learn` (
316  `id` int(11) NOT NULL auto_increment,
317  `email` int(11) NOT NULL default '0',
318  `folder` varchar(255) NOT NULL default '',
319  `active` tinyint(1) NOT NULL default '0',
320  `type` enum('spam','ham') NOT NULL default 'spam',
321  PRIMARY KEY  (`id`)
322) ENGINE=MyISAM DEFAULT CHARSET=latin1;
323
324-- --------------------------------------------------------
325
326--
327-- Table structure for table `users`
328--
329
330CREATE TABLE `users` (
331  `id` int(11) NOT NULL auto_increment,
332  `domainid` int(11) NOT NULL default '0',
333  `email` varchar(255) collate utf8_unicode_ci NOT NULL default '',
334  `passwd` varchar(200) collate utf8_unicode_ci NOT NULL default '',
335  `full_name` text collate utf8_unicode_ci NOT NULL,
336  `access` tinyint(1) NOT NULL default '0',
337  `enew` tinyint(4) NOT NULL default '1',
338  `p_imap` tinyint(1) default '1',
339  `p_pop3` tinyint(1) default '1',
340  `p_webmail` tinyint(1) default '1',
341  `p_spamassassin` tinyint(1) default '0',
342  `move_spam` varchar(100) collate utf8_unicode_ci default NULL,
343  `cpasswd` varchar(255) character set utf8 NOT NULL default '',
344  `p_forwarding` tinyint(1) default '1',
345  `p_mailarchive` tinyint(1) default '0',
346  `p_bogofilter` tinyint(1) NOT NULL default '0',
347  `p_spam_del` tinyint(1) NOT NULL default '0',
348  `p_sa_learn` tinyint(1) NOT NULL default '0',
349  `p_fetchmail` tinyint(1) NOT NULL default '0',
350  `p_webinterface` tinyint(1) NOT NULL default '1',
351  `p_autores_xheader` tinyint(1) NOT NULL default '0',
352  `mb_size` int(11) NOT NULL default '0',
353  `p_check_polw` tinyint(1) NOT NULL default '1',
354  `p_check_grey` tinyint(1) NOT NULL default '0',
355  `p_spam_fwd` tinyint(1) NOT NULL default '0',
356  PRIMARY KEY  (`id`),
357  UNIQUE KEY `email` (`email`)
358) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
359
360-- --------------------------------------------------------
361
362DROP VIEW IF EXISTS smtpd_recipient_classes;
363CREATE VIEW smtpd_recipient_classes AS  SELECT email,if(p_check_polw=1,'check_polw','') AS polw,if(p_check_grey=1,'check_grey','') AS grey FROM users WHERE access=1 AND p_check_polw!=0 AND p_check_polw!=0 UNION SELECT efrom,if(p_check_polw=1,'check_polw','') AS polw,if(p_check_grey=1,'check_grey','') AS grey FROM forwardings WHERE access=1 AND p_check_polw!=0 AND p_check_polw!=0;
364
365INSERT INTO `adm_users` ( `id` , `username` , `passwd` , `access` , `manager` , `full_name` , `cpasswd` , `web_lang` )
366VALUES (
367NULL , 'admin', '', '1', '1', NULL , '$1$Ekjbn5PV$lTKL1k2IkDKzpneppf6Wx0', ''
368);
369
370
Note: See TracBrowser for help on using the browser.