lieser / dkim_verifier

DKIM Verifier Extension for Mozilla Thunderbird
MIT License
210 stars 35 forks source link

getARHResult does not seem to support case sensitive header fields. #213

Closed sbsrouteur closed 3 years ago

sbsrouteur commented 4 years ago

I have tried using ARH verification, since my email server put them in the message header. However they are not teated, and I get many "DKIM_Verifier.AuthVerifier ERROR Ignoring error in parsing of ARH: Error: Parsing" error messages.

When looking at the source of the message I see : Authentication-Results: xxxxxxxxxxx; spf=pass smtp.mailfrom=bounce_1184+caABZAFRIAAASOUAABWXAQAAAAAAAABE3DSPYA@xxxxxx.com; dkim=pass (good signature) header.d=xxxxxxxxx.com header.b=rV5I05LEAq; dmarc=fail header.from=xxxxx.com (p=none sampling=18 pct=100); iprev=pass policy.iprev=93.xxxxxxxxx (PTR xxxxxxxx.de); iprev=pass policy.iprev=93.xxxxxxx (HELO xxxxxxxxx.de); iprev=fail policy.iprev=xxxxxxx reason="does not match" (MAIL bounce_1184+caABZAFRIAAASOUAABWXAQAAAAAAAABE3DSPYA@xxxxxxxx.com)

Is this just an uppercase/lowercase issue, and can it be fixed, or am I missing something?

lieser commented 4 years ago

The problem is the last entry, iprev=fail policy.iprev=xxxxxxx reason="does not match" (MAIL bounce_1184+caABZAFRIAAASOUAABWXAQAAAAAAAABE3DSPYA@xxxxxxxx.com).

The error is that the reason is coming after the policy.iprev. But if the reason is there, it must come directly after the method part (iprev=fail). (If you are interested in the details, see the resinfo definition at https://tools.ietf.org/html/rfc7601#section-2.2).

So it should be e,g. iprev=fail reason="does not match" (MAIL bounce_1184+caABZAFRIAAASOUAABWXAQAAAAAAAABE3DSPYA@xxxxxxxx.com) policy.iprev=xxxxxxx. Note that the comment ((MAIL bounce_[...]@xxxxxxxx.com)) can also be left at the end,

sbsrouteur commented 4 years ago

Thank you for the feedback, I will look with the MTA vendor to try get that fixed.

lieser commented 3 years ago

Will close the issue here for now, as I currently do not plan to relax the add-ons parsing here.

Out of interested, did the MTA vendor say that they will fix it?

sbsrouteur commented 3 years ago

Yes you can close. I sent the report to the MTA, and they told me they would take this into account. Thank you for looking in this matter.