changeset 465:79e944269c0b

SA needs original rfc5321 envelope from to do proper spf checking. Remove some debug code.
author Carl Byington <carl@five-ten-sg.com>
date Thu, 25 Apr 2019 09:35:53 -0700
parents 428de28b34b7
children 8ad675a5d448
files ChangeLog NEWS configure.in dnsbl.spec.in src/context.cpp src/dnsbl.cpp
diffstat 6 files changed, 18 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Mar 10 08:49:27 2019 -0700
+++ b/ChangeLog	Thu Apr 25 09:35:53 2019 -0700
@@ -1,3 +1,7 @@
+6.76 2019-04-25
+    SA needs original rfc5321 envelope from to do proper spf
+    checking. Remove some debug code.
+
 6.75 2019-03-10
     change dkim_from syntax to allow "signer1,signer2;spf data"
 
--- a/NEWS	Sun Mar 10 08:49:27 2019 -0700
+++ b/NEWS	Thu Apr 25 09:35:53 2019 -0700
@@ -1,3 +1,4 @@
+6.76 2019-04-25 SA needs original rfc5321 envelope from to do proper spf checking.
 6.75 2019-03-10 change dkim_from syntax to allow "signer1,signer2;spf data"
 6.74 2018-12-24 add debug code for spf check with microsoft /14
 6.73 2018-09-18 ignore dnswl entries if the sender is <>
--- a/configure.in	Sun Mar 10 08:49:27 2019 -0700
+++ b/configure.in	Thu Apr 25 09:35:53 2019 -0700
@@ -1,6 +1,6 @@
 
 AC_PREREQ(2.59)
-AC_INIT(dnsbl,6.75,carl@five-ten-sg.com)
+AC_INIT(dnsbl,6.76,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
--- a/dnsbl.spec.in	Sun Mar 10 08:49:27 2019 -0700
+++ b/dnsbl.spec.in	Thu Apr 25 09:35:53 2019 -0700
@@ -151,6 +151,11 @@
 
 
 %changelog
+* Thu Apr 25 2019 Carl Byington <carl@five-ten-sg.com> - 6.76-1
+- SA needs original rfc5321 envelope from to do proper spf
+  checking.
+- remove some debug code
+
 * Sun Mar 10 2019 Carl Byington <carl@five-ten-sg.com> - 6.75-1
 - change dkim_from syntax to allow "signer1,signer2;spf data"
 
--- a/src/context.cpp	Sun Mar 10 08:49:27 2019 -0700
+++ b/src/context.cpp	Thu Apr 25 09:35:53 2019 -0700
@@ -1230,11 +1230,11 @@
                         if ((mask >= 14) && (mask <= 32)) {     // microsoft has a /14
                             uint32_t low = (1 << (32-mask)) - 1;
                             ipy &= low ^ 0xffffffff;
-                            {
-                                char buf[maxlen];
-                                snprintf(buf, maxlen, "ip=%08x, spf=%08x/%d, mask=%08x", ip, ipy, mask, low);
-                                log(priv->queueid, "spf check %s", buf);
-                            }
+                            //{
+                            //    char buf[maxlen];
+                            //    snprintf(buf, maxlen, "ip=%08x, spf=%08x/%d, mask=%08x", ip, ipy, mask, low);
+                            //    log(priv->queueid, "spf check %s", buf);
+                            //}
                             if ((ipy <= ip) && (ip <= ipy + low)) {
                                 if (s) *s = '/';
                                 log(priv->queueid, "match ip4:%s", p);
--- a/src/dnsbl.cpp	Sun Mar 10 08:49:27 2019 -0700
+++ b/src/dnsbl.cpp	Thu Apr 25 09:35:53 2019 -0700
@@ -1330,7 +1330,8 @@
         }
     }
     if (spamc != spamc_empty) {
-        priv.assassin  = new SpamAssassin(&priv, priv.ip, priv.helo, priv.mailaddr, priv.queueid);
+        // SA needs original address to do proper SPF checking
+        priv.assassin  = new SpamAssassin(&priv, priv.ip, priv.helo, priv.origaddr, priv.queueid);
     }
     if (dccifd_port) {
         priv.dccifd = new DccInterface(dccifd_port, &priv, priv.ip, priv.helo, priv.mailaddr);