diff --git a/src/pilerimport.c b/src/pilerimport.c index 478849e3..d5f31cfe 100644 --- a/src/pilerimport.c +++ b/src/pilerimport.c @@ -47,7 +47,7 @@ int import_message(char *filename, struct session_data *sdata, struct __data *da post_parse(sdata, &state, cfg); if(sdata->sent > sdata->now) sdata->sent = sdata->now; - + if(sdata->sent == -1) sdata->sent = 0; rule = check_againt_ruleset(data->rules, &state, st.st_size); diff --git a/util/db-mysql.sql b/util/db-mysql.sql index 2f36de48..97b270ec 100644 --- a/util/db-mysql.sql +++ b/util/db-mysql.sql @@ -14,7 +14,7 @@ drop table if exists `sph_index`; create table if not exists `sph_index` ( `id` bigint not null, `from` char(255) default null, - `to` text(512) default null, + `to` text(8192) default null, `fromdomain` char(255) default null, `todomain` text(512) default null, `subject` text(512) default null, @@ -55,6 +55,7 @@ create index metadata_idx on metadata(`piler_id`); create index metadata_idx2 on metadata(`message_id`); create index metadata_idx3 on metadata(`bodydigest`); create index metadata_idx4 on metadata(`deleted`); +create index metadata_idx5 on metadata(`arrived`); drop table if exists `rcpt`;