fixing an odd exchange behaviour

This commit is contained in:
SJ 2014-01-13 13:06:10 +01:00
parent c4928d1710
commit dd2ea801bf
7 changed files with 8 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "0.1.25-master-branch"
#define BUILD 856
#define BUILD 857
#define HOSTID "mailarchiver"

View File

@ -199,6 +199,7 @@ struct session_data {
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;

View File

@ -69,6 +69,8 @@ int import_message(char *filename, struct session_data *sdata, struct __data *da
sdata->sent = 0;
sdata->delivered = 0;
sdata->import = 1;
state = parse_message(sdata, 1, data, cfg);
post_parse(sdata, &state, cfg);

View File

@ -471,6 +471,7 @@ void init_session_data(struct session_data *sdata, struct __config *cfg){
sdata->__acquire = sdata->__parsed = sdata->__av = sdata->__store = sdata->__compress = sdata->__encrypt = 0;
sdata->import = 0;
for(i=0; i<MAX_RCPT_TO; i++) memset(sdata->rcptto[i], 0, SMALLBUFSIZE);

View File

@ -186,7 +186,7 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
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);

View File

@ -318,6 +318,7 @@ void initialise_configuration(){
data.folder = 0;
data.recursive_folder_names = 0;
inithash(data.mydomains);
initrules(data.archiving_rules);
initrules(data.retention_rules);

View File

@ -217,6 +217,7 @@ int main(int argc, char **argv){
data.folder = 0;
data.recursive_folder_names = 0;
inithash(data.mydomains);
initrules(data.archiving_rules);
initrules(data.retention_rules);