X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fspf.c;h=a203c07baa8b0d70ed4fdb9737f1131d1733a300;hb=de6f74f297d040a34746bc8e1829ad4b867441c9;hp=12994a690d226b363d1b7a4282cb889925b6b1fa;hpb=e34f8ca2022e340d3c0e36260a0232fab306dfcc;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/spf.c b/src/src/spf.c index 12994a690..a203c07ba 100644 --- a/src/src/spf.c +++ b/src/src/spf.c @@ -22,8 +22,6 @@ static spf_result_id spf_result_id_list[] = { { US"fail", 3 }, { US"softfail", 4 }, { US"none", 5 }, - { US"err_temp", 6 }, /* Deprecated Apr 2014 */ - { US"err_perm", 7 }, /* Deprecated Apr 2014 */ { US"temperror", 6 }, /* RFC 4408 defined */ { US"permerror", 7 } /* RFC 4408 defined */ }; @@ -112,7 +110,10 @@ else { /* get SPF result */ if (action == SPF_PROCESS_FALLBACK) + { SPF_request_query_fallback(spf_request, &spf_response, CS spf_guess); + spf_result_guessed = TRUE; + } else SPF_request_query_mailfrom(spf_request, &spf_response); @@ -151,10 +152,17 @@ return FAIL; gstring * authres_spf(gstring * g) { +uschar * s; if (!spf_result) return g; -return string_append(g, 4, US";\n\tspf=", spf_result, - US" smtp.mailfrom=", expand_string(US"$sender_address_domain")); +g = string_append(g, 2, US";\n\tspf=", spf_result); +if (spf_result_guessed) + g = string_cat(g, US" (best guess record for domain)"); + +s = expand_string(US"$sender_address_domain"); +return s && *s + ? string_append(g, 2, US" smtp.mailfrom=", s) + : string_cat(g, US" smtp.mailfrom=<>"); }