# HG changeset patch # User Carl Byington # Date 1489783838 25200 # Node ID 8f3a84de373912314ced283121e3d6fb49be3e39 # Parent 1ac5e2e0e963c7577838d6678e78969805cf624b handle redirect= elements in spf txt records diff -r 1ac5e2e0e963 -r 8f3a84de3739 ChangeLog --- a/ChangeLog Mon Mar 13 20:23:31 2017 -0700 +++ b/ChangeLog Fri Mar 17 13:50:38 2017 -0700 @@ -1,7 +1,7 @@ -6.53 2017-03-13 +6.53 2017-03-17 suppress duplicate calls to acceptable_content for messages with multiple recipients using the same filtering - context + context. handle redirect= elements in spf txt records 6.52 2017-03-09 document dkim/spf processing, handle a and a: elements diff -r 1ac5e2e0e963 -r 8f3a84de3739 NEWS --- a/NEWS Mon Mar 13 20:23:31 2017 -0700 +++ b/NEWS Fri Mar 17 13:50:38 2017 -0700 @@ -1,4 +1,4 @@ -6.53 2017-03-13 suppress duplicate calls to acceptable_content() +6.53 2017-03-17 suppress duplicate calls to acceptable_content(); redirect= in spf 6.52 2017-03-09 document dkim/spf processing, handle a and a: elements 6.51 2017-03-06 parse spf txt records for required dkim signers 6.50 2017-02-22 reject if dkim signer is listed on surbl diff -r 1ac5e2e0e963 -r 8f3a84de3739 dnsbl.spec.in --- a/dnsbl.spec.in Mon Mar 13 20:23:31 2017 -0700 +++ b/dnsbl.spec.in Fri Mar 17 13:50:38 2017 -0700 @@ -3,7 +3,7 @@ Summary: Sendmail milter for spam control Name: @PACKAGE@ Version: @VERSION@ -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ Group: System Environment/Daemons Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz @@ -155,6 +155,9 @@ %changelog +* Fri Mar 17 2017 Carl Byington - 6.53-2 +- handle redirect= elements in spf txt records. + * Mon Mar 13 2017 Carl Byington - 6.53-1 - suppress duplicate calls to acceptable_content for messages with multiple recipients using the same filtering context. diff -r 1ac5e2e0e963 -r 8f3a84de3739 src/context.cpp --- a/src/context.cpp Mon Mar 13 20:23:31 2017 -0700 +++ b/src/context.cpp Fri Mar 17 13:50:38 2017 -0700 @@ -1182,7 +1182,16 @@ } } p = buf; - while ((level < 5) && (p = strstr(p, " include:"))) { + while ((level < 5) && ((p = strstr(p, " redirect=")))) { + p += 10; + char *b = strchr(p, ' '); + if (b) *b = '\0'; + if (resolve_spf(p, ip, priv, level+1)) return true; + if (b) *b = ' '; + p = (b) ? b : e; + } + p = buf; + while ((level < 5) && ((p = strstr(p, " include:")))) { p += 9; char *b = strchr(p, ' '); if (b) *b = '\0';