Henry Miller:
> Asking user to type in ?_submission._tcp? seems like a poor
> workaround. This being Autodiscovery it?d be logical for Postfix
> to automagically derive SRV lookup address based on relayhost
> setting.
>
> ?relayhost = example.com? is an obvious candidate for SRV autodiscovery
> if an MX lookup fails or if SRV is prefered over MX. With an
> optional switch to disable ?relayhost_autodiscovery?.

Except that a) the SMTP client does not know whether a destination is
derived from the relayhost parameter and b) it's entirely legitimate
to specify the up-stream relay with transport_maps or default_transport.

That would be an argument against making the relayhost parameter
special, and in favor of using special destination syntax.

A challenge with special destination syntax (see below) is that
we want to allow these in main.cf and transport maps, but not in
user-specified email addresses.

syntax                      |lookups
==================================================
example.com                 |MX (SMTP client only) then A/AAAA
[example.com]               |A/AAAA (all programs)
_submission._tcp.example.com|SRV (SMTP client only) then A/AAAA
<example.com>               |SRV then A/AAAA (invalid outside the SMTP client)
SRV:example.com             |SRV then A/AAAA (invalid outside the SMTP client)

The fourth example uses angle brackets instead of [].

The _submission._tcp.example.com would require extra code to block
this in user-specified email addresses; the forms SRV:example.com,
<example.com> and [example.com] are rejected by Postfix's syntax
checks for email address domains.

In any case, autoconfiguration is no good without the part that
validates the hostnames in SRV responses. That part needs to be
configurable, and needs a good default value.

        Wietse

Reply via email to