Skip to content
Snippets Groups Projects
Commit bbb45027 authored by rswindell's avatar rswindell
Browse files

Fix bug in new feature introduced (but did not work) in rev 1.502: message

subjects shorter than 10 chars were not supposed to be hashed (for SPAM
detection), but the SPAM source is a bit position, not an ordinal, so the wrong
SPAM sources (body and msg-id) were removed from the hashing souce list rather
than the subject (which was still hashed).
parent f8732045
Branches
Tags
No related merge requests found
......@@ -1997,7 +1997,7 @@ static int chk_received_hdr(SOCKET socket,const char *buf,IN_ADDR *dnsbl_result,
strncpy(ip,p,16);
ip[15]=0;
check_addr.s_addr = inet_addr(ip);
lprintf(LOG_DEBUG,"%04d DEBUG checking %s [%s]",socket,host_name,ip);
lprintf(LOG_DEBUG,"%04d SMTP DNSBL checking received header address %s [%s]",socket,host_name,ip);
if((dnsbl_result->s_addr=dns_blacklisted(socket,check_addr,host_name,dnsbl,dnsbl_ip))!=0)
lprintf(LOG_NOTICE,"%04d SMTP BLACKLISTED SERVER on %s: %s [%s] = %s"
,socket, dnsbl, host_name, ip, inet_ntoa(*dnsbl_result));
......@@ -2884,7 +2884,7 @@ static void smtp_thread(void* arg)
is_spam=TRUE;
if(msg.subj==NULL || strlen(msg.subj) < SPAM_HASH_SUBJECT_MIN_LEN)
sources&=~SMB_HASH_SOURCE_SUBJECT;
sources&=~(1<<SMB_HASH_SOURCE_SUBJECT);
lprintf(LOG_DEBUG,"%04d SMTP Calculating message hashes (sources=%lx, msglen=%u)"
,socket, sources, strlen(msgbuf));
if((hashes=smb_msghashes(&msg, msgbuf, sources)) != NULL) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment