Use relaxed DNS parsing, allowing underscores in DNS labels #172
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
With the default hickory-dns name parsing, DNS labels cannot contain underscores due to a certain interpretation of RFCs which disallow usage for naming of hosts. However, DNS labels are allowed and do contain underscores, which causes issues with mail delivery.
Most usages of hickory-dns are corrected in stalwartlabs/mail-auth#25 which also adds a parsing helper function. The PR also contains additional reasoning and examples of mail flow issues.
To test this PR, a branch containing the Cargo references to a fixed mail-auth branch is provided here: https://github.com/fabian-z/mail-server/tree/fix-dns-build
This corresponds to
https://github.com/hickory-dns/hickory-dns issue #1904, #2009