Peter Wienemann via Postfix-users:
> On 2023-12-12 15:51:58 +0100, Wietse Venema via Postfix-users wrote:
> > Peter Wienemann via Postfix-users:
> >> Dear Postfix experts,
> >>
> >> checking the documentation for the relayhost parameter [0] I find no
> >> indication how Postfix behaves in case of multiple relay hosts with
> >> multiple DNS entries. Let us assume the following setting:
> > 
> >      for each destination d in relayhost:
> > 
> >          try to deliver the remaining recipients to destination d
> > 
> >          if no recipients remain, stop.
> > 
> >      defer any remaining recipients
> > 
> > Perhaps surprisingly, Postfix delivers mail to "destination d" for
> > all supported forms of "d", whether that is a domain name, [hostname],
> > [ipaddress], and with or without an explicit :port.
> 
> Thanks Wietse! Your pseudo-code clarifies the approach chosen by 
> Postfix. What still remains unclear to me is the order in which 
> destinations are tried. Let us again consider the following example:
> 
> relayhost = mail1.example.com, mail2.example.com
> 
> I think RFC 5321 requires that one starts with MX records before falling 
> back to A or AAAA records (unless [] notation is used). So my guess is 
> that the trial sequence starts in the following way:

No. Given destinations (d1, d2), the pesudocode is:
 
     for each destination d in (d1, d2):

         try to deliver the remaining recipients to destination d

         if no recipients remain, stop.

     defer any remaining recipients

The "program then "executes" the following steps:

     try to deliver the remaining recipients to destination d1

     if no recipients remain, stop.

     try to deliver the remaining recipients to destination d2

     if no recipients remain, stop.

     defer any remaining recipients.

> (falling back to A/AAAA records after trying MX records)

There is no such thing as falling back to A or AAAA records after
trying MX records. The two are mutually exclusive.

        Wietse
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to