Mercurial > dnsbl
comparison 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 |
comparison
equal
deleted
inserted
replaced
329:c9932c4d8053 | 330:b5b93a7e1e6d |
---|---|
1290 } | 1290 } |
1291 else if (fromvalue == token_black) { | 1291 else if (fromvalue == token_black) { |
1292 st = black; | 1292 st = black; |
1293 } | 1293 } |
1294 else if ((fromvalue == token_white) && !self) { | 1294 else if ((fromvalue == token_white) && !self) { |
1295 st = white; | 1295 // whitelisting based on envelope from value, but ignore it if |
1296 // we have a dkim requirement for that domain. | |
1297 const char *domain = strchr(priv.mailaddr, '@'); | |
1298 if (domain) { | |
1299 DKIMP dk = con.find_dkim_from(domain); | |
1300 if (dk && (dk->action == token_require_signed)) { | |
1301 my_syslog(&priv, "dkim require_signed overrides envelope from whitelist"); | |
1302 } | |
1303 else st = white; | |
1304 } | |
1305 else st = white; // might be <>, envelope from has no @ | |
1296 } | 1306 } |
1297 else { | 1307 else { |
1298 // check the dns based lists, whitelist first | 1308 // check the dns based lists, whitelist first |
1299 DNSWLP acceptlist = NULL; // list that caused the whitelisting | 1309 DNSWLP acceptlist = NULL; // list that caused the whitelisting |
1300 if (check_dnswl(priv, con.get_dnswl_list(), acceptlist)) { | 1310 if (check_dnswl(priv, con.get_dnswl_list(), acceptlist)) { |