journal fix for outlook

This commit is contained in:
SJ 2015-01-19 16:00:38 +01:00
parent 5da2cb7f0d
commit 40d50f7115
2 changed files with 20 additions and 2 deletions

View File

@ -14,7 +14,7 @@
#define VERSION "1.1.1"
#define BUILD 900
#define BUILD 901
#define HOSTID "mailarchiver"

View File

@ -416,7 +416,25 @@ int parse_line(char *buf, struct _state *state, struct session_data *sdata, int
}
if(state->message_state == MSG_BODY && sdata->ms_journal == 1 && strncasecmp(buf, "Recipient:", strlen("Recipient:")) == 0){
/*
* A normal journal looks like this:
*
* Sender: sender@domain
* Subject: Test normal
* Message-Id: ...
* Recipient: user1@domain
* Recipient: user2@domain, Forwarded: user1@domain
*
* However if outlook forwards an email, then the journal is somewhat changed:
*
* Sender: sender@domain
* Subject: Test through outlook
* Message-Id: ...
* To: user1@domain
* To: user2@domain, Forwarded: user1@domain
*/
if(state->message_state == MSG_BODY && sdata->ms_journal == 1 && (strncasecmp(buf, "Recipient:", strlen("Recipient:")) == 0 || strncasecmp(buf, "To:", strlen("To:")) == 0) ){
state->is_header = 1;
state->is_1st_header = 1;
state->message_state = MSG_RECIPIENT;