Closed magkopian closed 6 years ago
Thanks for reporting it.
The Problem is the ;
at the end of the Authentication-Results header. If I remove it, the header is parsed without problems.
Note that, if I understand the RFC 7601 correctly, the ;
at end of the header is not a valid syntax. So this is not a bug in the add-on, but rather a RFC violation by the Zoho mail server.
Just noticed that Outlook does the same thing with Zoho. Here is an example of an Authentication-Results
header form Outlook,
Authentication-Results: spf=pass (sender IP is 91.194.248.199)
smtp.mailfrom=reply1.ebay.com; outlook.com; dkim=pass (signature was
verified) header.d=reply1.ebay.com;outlook.com; dmarc=pass action=none
header.from=reply1.ebay.com;
Seems like you are right about the violation of the RFC standard, but considering the fact that we can't actually do anything about it shouldn't we follow a less strict approach during parsing?
Also, apart from the Authentication-Results
header there is also the Received-SPF
header which could be used to obtain at least the SPF result, if the parsing of the Authentication-Results
fails.
Although admittedly maybe not the most user friendly, the strict parsing is intentionally (if all verifiers ignore RFC violations, the signers have no motivation to follow them (or even notice them)). But I could introduce an option to relax the parsing.
The reading of the Received-SPF
is probably not something I will implement myself, as I think the reading of the ARH is enough for most people. But if someone else implements it, I would be more than willing to integrate it in the add-on.
That sounds like a great idea and I completely agree, the user should have the option to chose between a relaxed or a strict validation mode. Furthermore, I think it should be better to have strict mode enabled by default and allow the user to manually disable it for the problematic servers. A global option would also be good to exist, but not enabled by default.
The new pre release v2.0.0pre4 has an advanced option for relaxed parsing.
Note that the ARH from Outlook that you posted will still not work, as there the outlook.com;
part is in the middle (and even multiple times). Before I invest more time into trying to also allowing this, could you please confirm that Outlook is still doing this?
Relax the parsing to allow some common RFC violations:
;
at the end/
in the b-tag, even if it is not in a quoted-string (#49, #71)Bellow original post:
Hello, Looks like there is an issue with parsing the
Authentication-Results
header as it is set by the Zoho mail server.For isolating the issue and preventing any confusion I have unchecked the
Verify DKIM Signatures
setting. Here is the resulting debug output.And here are the email headers of the same email, note though that I have obscured the domain of my server with
example.com
, as well as its IP address withx.x.x.x
.The extension reports
No Signature
on the DKIM field, which is to be expected I guess because the verification of the DKIM is disabled and Zoho doesn't verify DKIM, but the information about the SPF is also missing.