pyspf
pyspf copied to clipboard
Provide detailed explanation for SPF result, for "Received-SPF" header
RFC7208 requests that the "Received-SPF" header provides details about the reason the SPF result was what it was. See https://tools.ietf.org/html/rfc7208#section-9.1 . I don't see any API call in pyspf able to provide that kind of detail.
Since I am using pyspf from a MILTER filter and I can add an appropriate "Received-SPF" header to incoming emails, it would be very nice to be able to get the SPF tests details.
Thanks.
The mechanism attribute has the mechanism producing the result (e.g. failure). You also get a text diagnostic, e.g.
Received-SPF: PermError (mail.gathman.org: permanent error in processing domain of nextgen.com: Void lookup limit of 2 exceeded) client-ip=2a01:111:f400:fe5b::713; envelope-from="[email protected]"; helo=NAM12-BN8-obe.outbound.protection.outlook.com; receiver=mail.gathman.org; x-helo-spf=pass; identity=mailfrom
Can the documentation be improved?