11-11-2020 12:15 AM
I want to add SPF scan result to the headers.
How can I realize this?
Thanks,
Best regards
Kai
11-11-2020 12:42 AM
SPF enabled on mail flow policies will start logging SPF lookup results in headers and tracking/logs.
Mail Policies -> Mail Flow Policies -> Click on the policy SPF needs to be enabled for.
https://www.cisco.com/c/dam/en/us/products/collateral/security/esa-spf-dkim-dmarc.pdf
Regards,
Libin
11-12-2020 03:05 AM
Hi,
I do this with a message filter.
Something like:
insert-all-spf-results:
if (recv-listener == "InboundMail") {
# based on http://en.wikipedia.org/wiki/Sender_Policy_Framework
if (spf-status("mailfrom") == "Pass") { insert-header("X-IronPort-SPF-Result", "SPF-PASS"); }
if (spf-status("mailfrom") == "None") { insert-header("X-IronPort-SPF-Result", "SPF-NONE"); }
if (spf-status("mailfrom") == "Neutral") { insert-header("X-IronPort-SPF-Result", "SPF-NEUTRAL"); }
if (spf-status("mailfrom") == "Fail") { insert-header("X-IronPort-SPF-Result", "SPF-FAIL"); }
if (spf-status("mailfrom") == "SoftFail") { insert-header("X-IronPort-SPF-Result", "SPF-SOFTFAIL"); }
if (spf-status("mailfrom") == "TempError") { insert-header("X-IronPort-SPF-Result", "SPF-TEMPERROR"); }
if (spf-status("mailfrom") == "PermError") { insert-header("X-IronPort-SPF-Result", "SPF-PERMERROR"); }
}
or
insert-spf-results:
if (recv-listener == "IncomingMail") {
if ((spf-status("pra") == "SoftFail") OR (spf-status("mailfrom") == "SoftFail") OR (spf-status("helo") == "SoftFail")) {
insert-header("X-IP-SPF-Result", "SPF-SOFTFAIL");
}
if ((spf-status("pra") == "Fail") OR (spf-status("mailfrom") == "Fail") OR (spf-status("helo") == "Fail")) {
insert-header("X-IP-SPF-Result", "SPF-FAIL");
}
}
depending the needs...
regards,
Philippe
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide