maddy icon indicating copy to clipboard operation
maddy copied to clipboard

remote: Fix support for IP literals in recipient addresses

Open foxcpp opened this issue 6 years ago • 2 comments

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.

foxcpp avatar Dec 11 '19 22:12 foxcpp

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 destination pipeline directive rejects invalid domains.
  • It is not possible to send outbound messages using address literals. 550 5.1.1 IP address literals are not supported error 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.

foxcpp avatar Jan 02 '20 15:01 foxcpp

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.

yunginnanet avatar Feb 13 '22 13:02 yunginnanet