diff src/dnsbl.cpp @ 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 05b604c99e06
children 802e2b779ed1
line wrap: on
line diff
--- 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");