How to override an MX value for a particular domain using a transport_maps but have some form of redundancy

I have a postfix mail server and I want to override an MX value for a particular domain.

From my understanding this is can be done by the use of transport_maps

http://www.postfix.org/postconf.5.html#transport_maps

You add a line to /etc/postfix/transport:

example.com smtp:[9.9.9.9]

Generate a postmap file using:

postmap hash:/etc/postfix/transport

add or edit a line in /etc/postfix/main.cf:

transport_maps = hash:/etc/postfix/transport

Restart Postfix

The question I have is when normally using MX address you normally have multiple mail servers for redundancy (in case one go's off line) How can I achieve the same thing with a transport map as it seems to point to a single ip address. Is there any way to set so that it would try multiple ip addresses in the case the first one failed.


as far as I can tell the SMTP transport doesn't do that. however you can set a dummy dns domain with MX records pointing to the hosts you want to relay mails to and use it in your transport map without squared brackets:

dest.example.com smtp:dummy.example.net