Mercurial > dnsbl
changeset 393:dffedbdc8566 stable-6-0-51-2
start parsing spf txt records
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 06 Mar 2017 18:39:09 -0800 |
parents | ea458101de9b |
children | 619a4880a3bf |
files | src/context.cpp src/dnsbl.cpp |
diffstat | 2 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/context.cpp Mon Mar 06 18:06:24 2017 -0800 +++ b/src/context.cpp Mon Mar 06 18:39:09 2017 -0800 @@ -1147,8 +1147,8 @@ uint32_t low = (1 << (32-mask)) - 1; ipy &= low ^ 0xffffffff; if ((ipy <= ip) && (ip <= ipy + low)) { + if (s) *s = '/'; log(priv->queueid, "match %s", p); - if (s) log(priv->queueid, "match /%s", s+1); return true; } } @@ -1185,12 +1185,6 @@ if (dk) { const char *st = dk->action; - if ((st == token_require_signed) && - dk->signer && - strcmp(dk->signer, " ") && - resolve_spf(from, priv->ip, priv)) { - log(queueid, "spf pass for %s with required dkim signer", from); - } for (string_set::iterator s=signers.begin(); s!=signers.end(); s++) { // signed by a white listed signer if ((st == token_signed_white) && in_signing_set(*s,dk->signer)) { @@ -1213,7 +1207,7 @@ if (st == token_require_signed) { // not signed by a required signer, but maybe passes strong spf check // only check spf if the list of required signers is not a single blank. - if (dk->signer && strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) { + if (strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) { log(queueid, "spf pass for %s rather than required dkim signer", from); return token_white; }