remote: Fix support for IP literals in recipient addresses
Since a lot of authentication mechanisms are keyed on the MX or domain name, the IP literals support uses the rDNS domain of the IP address. This assumes forward-confirmed rDNS, but it should be fine for most mail servers.
~~There is, however, an issue with current implementation: it assumes the returned rDNS name is a recipient domain, not a MX what is not true for many mail servers.~~ ~~The correct behavior is to construct MX candidates list from rDNS names.~~
The new implementation of "security policies" broke it altogether and it is disabled now.
Removing from 0.1 milestone. Despite being a standard (RFC 5321), many services and email stack implementations do not support it. I do not see a practical reason to bother bending remote module implementation once more to make it work now.
Current behavior is:
- It is not possible to receive messages with address domain-part using an address literal since
destinationpipeline directive rejects invalid domains. - It is not possible to send outbound messages using address literals.
550 5.1.1 IP address literals are not supportederror will be returned.
If somebody wants to make it, I would do the following:
- Make most "security policy" implementations (see security.go) no-op if "domain" or "mx" is an address literal.
- Make lookupMX routine return a single MX candidate if "domain" is an address literal.
- Remove existing but disabled code for rDNS-resolution of IP literals.
I think this is the first time I've ever seen someone give themselves the "good first issue" tag on their own repo
jokes aside thanks for all your work. luckily I don't think most people desire to use IP literals in their mx stack.