Mercurial > dnsbl
diff src/dnsbl.cpp @ 330:b5b93a7e1e6d
ignore envelope-from based whitelisting if we have a dkim requirement for that domain
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 19 Dec 2016 12:05:06 -0800 |
parents | c9932c4d8053 |
children | 9800776436b9 |
line wrap: on
line diff
--- a/src/dnsbl.cpp Mon Dec 19 08:29:16 2016 -0800 +++ b/src/dnsbl.cpp Mon Dec 19 12:05:06 2016 -0800 @@ -1292,7 +1292,17 @@ st = black; } else if ((fromvalue == token_white) && !self) { - st = white; + // whitelisting based on envelope from value, but ignore it if + // we have a dkim requirement for that domain. + const char *domain = strchr(priv.mailaddr, '@'); + if (domain) { + DKIMP dk = con.find_dkim_from(domain); + if (dk && (dk->action == token_require_signed)) { + my_syslog(&priv, "dkim require_signed overrides envelope from whitelist"); + } + else st = white; + } + else st = white; // might be <>, envelope from has no @ } else { // check the dns based lists, whitelist first