fixing spam header recognition

Signed-off-by: SJ <sj@acts.hu>
This commit is contained in:
SJ 2016-05-05 21:13:45 +02:00
parent 23e0d829cb
commit c2e7a94b4e
2 changed files with 5 additions and 5 deletions

View File

@ -13,7 +13,7 @@
#define VERSION "1.2.0-master"
#define BUILD 942
#define BUILD 943
#define HOSTID "mailarchiver"

View File

@ -197,10 +197,6 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
sdata->restored_copy = 1;
}
if(*(cfg->spam_header_line) != '\0' && strncmp(buf, cfg->spam_header_line, strlen(cfg->spam_header_line)) == 0){
sdata->spam_message = 1;
}
if(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))){
if(sdata->import == 0){
sdata->ms_journal = 1;
@ -347,6 +343,10 @@ int parse_line(char *buf, struct parser_state *state, struct session_data *sdata
if(state->is_header == 1){
if(*(cfg->spam_header_line) != '\0' && strncmp(buf, cfg->spam_header_line, strlen(cfg->spam_header_line)) == 0){
sdata->spam_message = 1;
}
if(strncasecmp(buf, "From:", strlen("From:")) == 0) state->message_state = MSG_FROM;
else if(strncasecmp(buf, "Content-Type:", strlen("Content-Type:")) == 0){