Browse code

Experimental mode: Remove simple string search in SPF

git-svn: trunk@3148

Nigel Horne authored on 2007/07/15 18:19:33
Showing 2 changed files
... ...
@@ -1,3 +1,7 @@
1
+Sun Jul 15 09:25:07 BST 2007 (njh)
2
+----------------------------------
3
+  * clamav-milter:	Experimental mode: Remove simple string search in SPF
4
+
1 5
 Sat Jul 14 23:50:56 BST 2007 (njh)
2 6
 ----------------------------------
3 7
   * clamav-milter:	Experimental mode: Handle A and MX in SPF records
... ...
@@ -33,7 +33,7 @@
33 33
  */
34 34
 static	char	const	rcsid[] = "$Id: clamav-milter.c,v 1.312 2007/02/12 22:24:21 njh Exp $";
35 35
 
36
-#define	CM_VERSION	"devel-140707"
36
+#define	CM_VERSION	"devel-150707"
37 37
 
38 38
 #if HAVE_CONFIG_H
39 39
 #include "clamav-config.h"
... ...
@@ -6131,8 +6131,8 @@ resolve(const char *host, table_t *t)
6131 6131
  * Currently only handles ip4, a and mx fields in the DNS record
6132 6132
  * Having said that, this is NOT a replacement for spf-milter, it is NOT
6133 6133
  *	an SPF system, we ONLY use SPF records to reduce phish false positives
6134
- * TODO: include: hostnames
6135
- * TODO: IPv6
6134
+ * TODO: ptr include hostnames
6135
+ * TODO: IPv6?
6136 6136
  */
6137 6137
 static void
6138 6138
 spf(struct privdata *privdata)
... ...
@@ -6230,12 +6230,6 @@ spf(struct privdata *privdata)
6230 6230
 			 * trivial check is of little real benefit, but it
6231 6231
 			 * won't create false positives.
6232 6232
 			 */
6233
-			if(strstr(txt, privdata->ip) != NULL) {
6234
-				logg("SPF simple pass\n");
6235
-				privdata->spf_ok = 1;
6236
-				break;
6237
-			}
6238
-
6239 6233
 #ifdef HAVE_INET_NTOP
6240 6234
 			/* IPv4 address ? */
6241 6235
 			if(inet_pton(AF_INET, privdata->ip, &remote_ip) <= 0) {