# HG changeset patch # User Carl Byington # Date 1545673056 28800 # Node ID ad05c61d63729253c291184842fdd1b594863365 # Parent e2c09e0c4784db215515d8498cb66865da484985 add debug code for spf check with microsoft /14 diff -r e2c09e0c4784 -r ad05c61d6372 ChangeLog --- a/ChangeLog Tue Sep 18 09:52:56 2018 -0700 +++ b/ChangeLog Mon Dec 24 09:37:36 2018 -0800 @@ -1,3 +1,6 @@ +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 <> allow autowhite of recipients with local parts up to 35 characters. diff -r e2c09e0c4784 -r ad05c61d6372 NEWS --- a/NEWS Tue Sep 18 09:52:56 2018 -0700 +++ b/NEWS Mon Dec 24 09:37:36 2018 -0800 @@ -1,3 +1,4 @@ +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 <> 6.72 2018-06-06 add unsigned_black for enforcement of dmarc policy 6.69 2018-04-10 fix spf mx:domain.tld token parsing diff -r e2c09e0c4784 -r ad05c61d6372 configure.in --- a/configure.in Tue Sep 18 09:52:56 2018 -0700 +++ b/configure.in Mon Dec 24 09:37:36 2018 -0800 @@ -1,6 +1,6 @@ AC_PREREQ(2.59) -AC_INIT(dnsbl,6.73,carl@five-ten-sg.com) +AC_INIT(dnsbl,6.74,carl@five-ten-sg.com) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) diff -r e2c09e0c4784 -r ad05c61d6372 dnsbl.spec.in --- a/dnsbl.spec.in Tue Sep 18 09:52:56 2018 -0700 +++ b/dnsbl.spec.in Mon Dec 24 09:37:36 2018 -0800 @@ -151,6 +151,9 @@ %changelog +* Mon Dec 24 2018 Carl Byington - 6.74-1 +- add debug code for spf check with microsoft /14 + * Tue Sep 18 2018 Carl Byington - 6.73-1 - ignore dnswl entries if the sender is <> - allow autowhite of recipients with local parts up to 35 characters. diff -r e2c09e0c4784 -r ad05c61d6372 src/context.cpp --- a/src/context.cpp Tue Sep 18 09:52:56 2018 -0700 +++ b/src/context.cpp Mon Dec 24 09:37:36 2018 -0800 @@ -1215,9 +1215,14 @@ if (inet_aton(p, &ipx)) { uint32_t ipy = ntohl(ipx.s_addr); int mask = (s) ? atoi(s+1) : 32; - if ((mask >= 16) && (mask <= 32)) { + 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); + } if ((ipy <= ip) && (ip <= ipy + low)) { if (s) *s = '/'; log(priv->queueid, "match ip4:%s", p);