Log every SMTP transaction in a MySQL database on SME Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

12 years ago
CREATE TABLE `messages` (
`mail_id` varchar(255) NOT NULL default '',
`date_day` date,
`date_time` time,
12 years ago
`remote_ip` varchar(255) default NULL,
`remote_host` varchar(255) default NULL,
`remote_info` varchar(255) default NULL,
`auth_user` varchar(30) default NULL,
12 years ago
`sender` varchar(255) default NULL,
`subject` varchar(255) default NULL,
12 years ago
`header_size` int(11) default NULL,
`body_size` int(11) default NULL,
`spam_status` float default NULL,
`deny` set('YES','NO') default NULL,
`deny_plugin` varchar(100) default '',
`deny_code` int(11) default '0',
`deny_msg` text,
PRIMARY KEY (`mail_id`)
12 years ago
) TYPE=InnoDB;
12 years ago
CREATE TABLE `rcpts` (
`rcpt_id` int(11) NOT NULL auto_increment,
`mail_id` varchar(255) NOT NULL default '',
`recipient` varchar(255),
PRIMARY KEY (`rcpt_id`)
12 years ago
) TYPE=InnoDB;
12 years ago
CREATE TABLE `message_body` (
`bdy_id` int(11) NOT NULL auto_increment,
`mail_id` varchar(255) NOT NULL default '',
`body` text,
PRIMARY KEY (`bdy_id`)
12 years ago
) TYPE=InnoDB;
CREATE TABLE `message_headers` (
`header_id` int(11) NOT NULL auto_increment,
`mail_id` varchar(255) NOT NULL default '',
`header` text,
PRIMARY KEY (`header_id`)
12 years ago
) TYPE=InnoDB;