From 7969eaa1729b357bd58c4cc87d175ebf481a4494 Mon Sep 17 00:00:00 2001
From: rswindell <>
Date: Thu, 12 Sep 2013 09:34:03 +0000
Subject: [PATCH] Remove message subjects from the sources hashed for the "SPAM
 hash" database as spammers are now hijacking common/valid mail subjects (e.g.
 "Google Email Verification") for their spam messages and blocking all msgs
 with such subjects is too heavy-handed an approach. :-(

---
 src/sbbs3/mailsrvr.c | 3 ---
 src/smblib/smbdefs.h | 4 ++--
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/sbbs3/mailsrvr.c b/src/sbbs3/mailsrvr.c
index f52eac3fa6..5e174815ff 100644
--- a/src/sbbs3/mailsrvr.c
+++ b/src/sbbs3/mailsrvr.c
@@ -81,7 +81,6 @@ static char* badrsp_err	=	"%s replied with:\r\n\"%s\"\r\n"
 
 #define TIMEOUT_THREAD_WAIT		60		/* Seconds */
 #define DNSBL_THROTTLE_VALUE	1000	/* Milliseconds */
-#define SPAM_HASH_SUBJECT_MIN_LEN	10	/* characters */
 
 #define STATUS_WFC	"Listening"
 
@@ -2988,8 +2987,6 @@ static void smtp_thread(void* arg)
 					if((dnsbl_recvhdr || dnsbl_result.s_addr) && startup->options&MAIL_OPT_DNSBL_SPAMHASH)
 						is_spam=TRUE;
 
-					if(msg.subj==NULL || strlen(msg.subj) < SPAM_HASH_SUBJECT_MIN_LEN)
-						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, (uchar*)msgbuf, sources)) != NULL) {
diff --git a/src/smblib/smbdefs.h b/src/smblib/smbdefs.h
index 127a7055f7..551751a9e9 100644
--- a/src/smblib/smbdefs.h
+++ b/src/smblib/smbdefs.h
@@ -8,7 +8,7 @@
  * @format.tab-size 4		(Plain Text/Source Code File Header)			*
  * @format.use-tabs true	(see http://www.synchro.net/ptsc_hdr.html)		*
  *																			*
- * Copyright 2012 Rob Swindell - http://www.synchro.net/copyright.html		*
+ * Copyright 2013 Rob Swindell - http://www.synchro.net/copyright.html		*
  *																			*
  * This program is free software; you can redistribute it and/or			*
  * modify it under the terms of the GNU General Public License				*
@@ -479,7 +479,7 @@ enum {
 								/* These are the hash sources stored/compared for duplicate message detection: */
 #define SMB_HASH_SOURCE_DUPE	((1<<SMB_HASH_SOURCE_BODY)|(1<<SMB_HASH_SOURCE_MSG_ID)|(1<<SMB_HASH_SOURCE_FTN_ID))
 								/* These are the hash sources stored/compared for SPAM message detection: */
-#define SMB_HASH_SOURCE_SPAM	((1<<SMB_HASH_SOURCE_BODY)|(1<<SMB_HASH_SOURCE_SUBJECT))
+#define SMB_HASH_SOURCE_SPAM	((1<<SMB_HASH_SOURCE_BODY))
 
 typedef struct _PACK {
 
-- 
GitLab