add rule support for attachment filename

This commit is contained in:
SJ
2013-11-11 11:34:00 +01:00
parent 2ca6e5a5c0
commit dc3da74311
18 changed files with 71 additions and 24 deletions

View File

@ -109,36 +109,38 @@ create table if not exists `tag` (
create table if not exists `archiving_rule` (
`id` bigint unsigned not null auto_increment,
`domain` varchar(128) default null,
`from` char(128) default null,
`to` char(255) default null,
`subject` char(255) default null,
`from` varchar(128) default null,
`to` varchar(128) default null,
`subject` varchar(128) default null,
`_size` char(2) default null,
`size` int default 0,
`attachment_type` char(128) default null,
`attachment_name` varchar(128) default null,
`attachment_type` varchar(128) default null,
`_attachment_size` char(2) default null,
`attachment_size` int default 0,
`spam` tinyint(1) default -1,
`days` int default 0,
primary key (`id`),
unique(`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
unique(`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
) ENGINE=InnoDB;
create table if not exists `retention_rule` (
`id` bigint unsigned not null auto_increment,
`domain` varchar(128) default null,
`from` char(128) default null,
`to` char(255) default null,
`subject` char(255) default null,
`from` varchar(128) default null,
`to` varchar(128) default null,
`subject` varchar(128) default null,
`_size` char(2) default null,
`size` int default 0,
`attachment_type` char(128) default null,
`attachment_name` varchar(128) default null,
`attachment_type` varchar(128) default null,
`_attachment_size` char(2) default null,
`attachment_size` int default 0,
`spam` tinyint(1) default -1,
`days` int default 0,
primary key (`id`),
unique (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
unique (`domain`,`from`,`to`,`subject`,`_size`,`size`,`attachment_name`,`attachment_type`,`_attachment_size`,`attachment_size`,`spam`)
) ENGINE=InnoDB;

View File

@ -4,4 +4,6 @@ alter table `user_settings` add column `ga_secret` varchar(255) default null;
create index metadata_idx9 on metadata(`sent`);
alter table archiving_rule add column `attachment_name` varchar(128) default null;
alter table retention_rule add column `attachment_name` varchar(128) default null;