diff src/dnsbl.cpp @ 291:9f0d9fcb58dd stable-6-0-42

Never add auto-whitelist entries for outgoing mail from localhost
author Carl Byington <carl@five-ten-sg.com>
date Sat, 28 Jun 2014 17:01:56 -0700
parents bb69fdc3acaa
children fbbc341001cc
line wrap: on
line diff
--- a/src/dnsbl.cpp	Fri Mar 21 13:55:46 2014 -0700
+++ b/src/dnsbl.cpp	Sat Jun 28 17:01:56 2014 -0700
@@ -1367,6 +1367,11 @@
     const char *p = strchr(loto, '@');
     int len = (p) ? p-loto : max_local_size;
     if (len >= max_local_size) w = NULL;    // too big, pretend we don't have a whitelister
+
+    // ignore auto whitelisting from outgoing mail from localhost
+    const u_char *src = (const u_char *)&priv.ip;
+    if (src[0] == 127) w = NULL;            // outgoing mail from localhost, pretend we don't have a whitelister
+
     // record it if we have a whitelister
     if (w) {
         DELAYWHITEP dwp = new DELAYWHITE(loto, w, &con2);   // dwp takes ownership of the string