diff src/dnsbl.cpp @ 354:2fd904f2efc2

only do greylisting if we don't have any whitelisted recipients
author Carl Byington <carl@five-ten-sg.com>
date Mon, 26 Dec 2016 16:27:22 -0800
parents f5a6740cabee
children 90d433d1382e
line wrap: on
line diff
--- a/src/dnsbl.cpp	Mon Dec 26 12:35:36 2016 -0800
+++ b/src/dnsbl.cpp	Mon Dec 26 16:27:22 2016 -0800
@@ -1677,7 +1677,8 @@
             }
         }
         if (!rejecting) {
-            if (priv.want_dccgrey && grey) {
+            // only greylist if we don't have any whitelisted recipients
+            if (priv.want_dccgrey && grey && !priv.have_whites && whites.empty()) {
                 smfi_setreply(ctx, (char*)"452", (char*)"4.2.1", (char*)"temporary greylist embargoed");
                 rc = SMFIS_TEMPFAIL;
             }