comparison src/context.cpp @ 395:a8cf6a3da907 stable-6-0-52

document dkim/spf processing
author Carl Byington <carl@five-ten-sg.com>
date Tue, 07 Mar 2017 09:39:25 -0800
parents dffedbdc8566
children d08da4b058e8
comparison
equal deleted inserted replaced
394:619a4880a3bf 395:a8cf6a3da907
1202 snprintf(buf, sizeof(buf), "Mail rejected - dkim signed by %s", *s); 1202 snprintf(buf, sizeof(buf), "Mail rejected - dkim signed by %s", *s);
1203 msg = string(buf); 1203 msg = string(buf);
1204 return token_black; 1204 return token_black;
1205 } 1205 }
1206 } 1206 }
1207 if (st == token_signed_white) {
1208 // not signed by a white signer, but maybe passes strong spf check
1209 if (resolve_spf(from, priv->ip, priv)) {
1210 log(queueid, "spf pass for %s rather than whitelisted dkim signer", from);
1211 return token_white;
1212 }
1213 }
1207 if (st == token_require_signed) { 1214 if (st == token_require_signed) {
1208 // not signed by a required signer, but maybe passes strong spf check 1215 // not signed by a required signer, but maybe passes strong spf check
1209 // only check spf if the list of required signers is not a single blank. 1216 // only check spf if the list of required signers is not a single blank.
1210 if (strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) { 1217 if (strcmp(dk->signer, " ") && resolve_spf(from, priv->ip, priv)) {
1211 log(queueid, "spf pass for %s rather than required dkim signer", from); 1218 log(queueid, "spf pass for %s rather than required dkim signer", from);