As previously documented, my public mail servers accept incoming mail on port 587.
This is accomplished by first telling one Postfix server to listen on port 587, and then telling another Postfix server to send via port 587. I will concentrate
on the latter as that part is relevant to our solution.
The solution from the previous article involved this entry in my transport configuration file on the public mailserver:
This directive states that all mail for myserver.example.org should be sent via port 587. That is,
the local mail server should connect to myserver.example.org on port 587. For our outgoing mail, we
will use something very similar. On my private mail server at home, I use this directive:
The wildcard (*) indicates that all mail should be sent via smtp to myhost.example.org via port 587. This works and works well.
But what if myhost.example.org is offline? Mail will queue up on your server and not be sent. Wouldn't it be nice to specify
an addition server?
You could try adding another wildcard line, but that will fail. You cannot have duplicate entries in a postmap file. I know.
I tried. I failed. Then I came up with another solution via DNS.