diff --git a/src/config.h b/src/config.h index 0451a43..525e19f 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,7 @@ #define VERSION "0.1.25-master-branch" -#define BUILD 856 +#define BUILD 857 #define HOSTID "mailarchiver" diff --git a/src/defs.h b/src/defs.h index 8d4e6aa..99a23c6 100644 --- a/src/defs.h +++ b/src/defs.h @@ -199,6 +199,7 @@ char digest[2*DIGEST_LENGTH+1]; time_t now, sent, delivered, retained; char ms_journal; + char import; int journal_envelope_length, journal_bottom_length; #ifdef NEED_MYSQL MYSQL mysql; diff --git a/src/import.c b/src/import.c index 6e79d96..a3c8b27 100644 --- a/src/import.c +++ b/src/import.c @@ -69,6 +69,8 @@ sdata->sent = 0; sdata->delivered = 0; + sdata->import = 1; + state = parse_message(sdata, 1, data, cfg); post_parse(sdata, &state, cfg); diff --git a/src/misc.c b/src/misc.c index 5c38126..5e72d10 100644 --- a/src/misc.c +++ b/src/misc.c @@ -471,6 +471,7 @@ sdata->__acquire = sdata->__parsed = sdata->__av = sdata->__store = sdata->__compress = sdata->__encrypt = 0; + sdata->import = 0; for(i=0; ircptto[i], 0, SMALLBUFSIZE); diff --git a/src/parser.c b/src/parser.c index b336baa..9e88ffa 100644 --- a/src/parser.c +++ b/src/parser.c @@ -186,7 +186,7 @@ sdata->spam_message = 1; } - if(state->is_1st_header == 1 && sdata->ms_journal == 0 && (strncmp(buf, "X-MS-Journal-Report:", strlen("X-MS-Journal-Report:")) == 0 || strncmp(buf, "X-MS-Exchange-Organization-Auth", strlen("X-MS-Exchange-Organization-Auth")) == 0)){ + if(state->is_1st_header == 1 && sdata->ms_journal == 0 && (strncmp(buf, "X-MS-Journal-Report:", strlen("X-MS-Journal-Report:")) == 0 || (sdata->import == 1 && strncmp(buf, "X-MS-Exchange-Organization-Auth", strlen("X-MS-Exchange-Organization-Auth")) == 0))){ sdata->ms_journal = 1; memset(state->message_id, 0, SMALLBUFSIZE); diff --git a/src/piler.c b/src/piler.c index 4623c8a..7e3adcd 100644 --- a/src/piler.c +++ b/src/piler.c @@ -318,6 +318,7 @@ data.folder = 0; data.recursive_folder_names = 0; + inithash(data.mydomains); initrules(data.archiving_rules); initrules(data.retention_rules); diff --git a/src/reindex.c b/src/reindex.c index 7e90ce1..109ada8 100644 --- a/src/reindex.c +++ b/src/reindex.c @@ -217,6 +217,7 @@ data.folder = 0; data.recursive_folder_names = 0; + inithash(data.mydomains); initrules(data.archiving_rules); initrules(data.retention_rules);