changeset 301:13905d36ca82

Generic regex now matches against the reverse dns PTR value
author Carl Byington <carl@five-ten-sg.com>
date Mon, 13 Oct 2014 20:48:40 -0700
parents 3a3b0cbcaf6e
children 52430ef70440
files ChangeLog NEWS configure.in src/dnsbl.cpp
diffstat 4 files changed, 14 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 13 13:55:21 2014 -0700
+++ b/ChangeLog	Mon Oct 13 20:48:40 2014 -0700
@@ -1,3 +1,6 @@
+6.44 2014-10-13
+    Generic regex now matches against the reverse dns PTR value
+
 6.43 2014-07-18
     Allow broken SRS0+ rather than the correct SRS0= tag.
 
--- a/NEWS	Mon Oct 13 13:55:21 2014 -0700
+++ b/NEWS	Mon Oct 13 20:48:40 2014 -0700
@@ -1,3 +1,4 @@
+6.44 2014-10-13 Generic regex now matches against the reverse dns PTR value
 6.43 2014-07-18 Allow broken SRS0+ rather than the correct SRS0= tag.
 6.42 2014-06-28 Never add auto-whitelist entries for outgoing mail from localhost.
 6.41 2014-03-21 Unique ip connection limits only apply to authenticated connections.
--- a/configure.in	Mon Oct 13 13:55:21 2014 -0700
+++ b/configure.in	Mon Oct 13 20:48:40 2014 -0700
@@ -1,6 +1,6 @@
 
 AC_PREREQ(2.59)
-AC_INIT(dnsbl,6.43,carl@five-ten-sg.com)
+AC_INIT(dnsbl,6.44,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([config.h.in])
 AC_CONFIG_HEADER([config.h])
 
--- a/src/dnsbl.cpp	Mon Oct 13 13:55:21 2014 -0700
+++ b/src/dnsbl.cpp	Mon Oct 13 20:48:40 2014 -0700
@@ -1319,7 +1319,8 @@
             return SMFIS_REJECT;
         }
         // check generic rdns
-        const char *msg = con.generic_match(priv.client_name);
+        if (priv.client_dns_name) {
+            const char *msg = con.generic_match(priv.client_dns_name);
         if (msg) {
             // reject the recipient based on generic reverse dns
             char buf[maxlen];
@@ -1328,6 +1329,7 @@
             return SMFIS_REJECT;
         }
     }
+    }
     if (st == black) {
         // reject the recipient based on blacklisting either from or to
         smfi_setreply(ctx, (char*)"550", (char*)"5.7.1", (char*)"no such user");