Closed fabian-z closed 5 months ago
@mdecimus Any feedback on this? This issue prevents real-world, standards compliant email delivery. We run the patched version for several months without further issues regarding this patch.
No need to update the PR, I made the changes directly on the main
branch. Could you confirm it works for you so I publish it to crates?
Thanks for your efforts! Going to test examples with your version of the fix tomorrow. However, the corresponding mail-server fix would need changes too, since I used the function as a helper there to avoid a new dependency on hickory_resolver in the code :smile:.
See also https://github.com/stalwartlabs/mail-server/pull/172
If you want, I would gladly offer to modify the other PR too to make it compatible :+1:
Your changes in https://github.com/stalwartlabs/mail-auth/commit/8be9cb49f5f3e808718a6a1e5b5fa55fd30eeeb3 look good to me and fix the underlying problem. Thank you very much! :tada:
Since this is fixed, I would like to look at the integration of this version and fix in mail-server / smtp-server. Would you prefer introducing a helper function here or usage of from_str_relaxed
in mail-server?
Thanks, a new version of mail-auth
has been published and Stalwart has been updated as well. Version 0.7.0
is going to include these fixes.
This allows DNS labels used for lookups to contain underscores, which may not be allowed as host names.
Prevents false TempError result, which masks underlying
proto error: Label contains invalid characters: Err(Errors { invalid_mapping, disallowed_by_std3_ascii_rules })
A minimal reproducing test program, by example of a service by MxToolbox (Deliverability Check) which uses a SPF chain (
mxtoolbox.com
->mxtoolbox.com.hosted.spf-report.com
->mxtoolbox_com_d82a85cc_0.flat.spf-report.com
):As of main / v0.3.6 this will incorrectly fail with "TempError" during SPF validation, which masks the actual DNS name parsing error. With the code changes in this PR the program will (correctly) print "Pass".
Related issues: https://github.com/hickory-dns/hickory-dns/issues/1904 https://github.com/hickory-dns/hickory-dns/issues/2009 https://github.com/stalwartlabs/mail-server/issues/126
Corresponding mail-server PR: https://github.com/stalwartlabs/mail-server/pull/172