comparison 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
comparison
equal deleted inserted replaced
353:6ef60389f44f 354:2fd904f2efc2
1675 msg = string(buf); 1675 msg = string(buf);
1676 rejecting = true; 1676 rejecting = true;
1677 } 1677 }
1678 } 1678 }
1679 if (!rejecting) { 1679 if (!rejecting) {
1680 if (priv.want_dccgrey && grey) { 1680 // only greylist if we don't have any whitelisted recipients
1681 if (priv.want_dccgrey && grey && !priv.have_whites && whites.empty()) {
1681 smfi_setreply(ctx, (char*)"452", (char*)"4.2.1", (char*)"temporary greylist embargoed"); 1682 smfi_setreply(ctx, (char*)"452", (char*)"4.2.1", (char*)"temporary greylist embargoed");
1682 rc = SMFIS_TEMPFAIL; 1683 rc = SMFIS_TEMPFAIL;
1683 } 1684 }
1684 else rc = SMFIS_CONTINUE; 1685 else rc = SMFIS_CONTINUE;
1685 } 1686 }