Victor Duchovni wrote:

>On Wed, Dec 31, 2008 at 05:38:33PM +0000, Andrew Hodgson wrote:

>> I am trying to find the answer whether Postfix will support multiple
>> smarthosts - i.e, sending to specific smarthosts, and if one fails, it
>> will try to send to the next one in the list, or will just use any
>> smart host in the list without issue?

[snip Bind config illustrating this can be done using DNS and MX records]

>Non-local mail is sent to "a.mx.example.com" if that fails, it is sent
>to "b.mx.example.com" and finally "c.mx.example.com", or you can adjust
>the MX preferences to be equal to get stastical load-balancing.

I did actually get this to work a couple of days ago, however in my case I 
manipulated DNS records on the content DNS server that resolv.conf was pointing 
at.  However, I want to try and do that with the Postfix conf if possible.

>Alternatively, if all SMTP deliveries go to the smarthost, and you
>don't want to or can't change DNS:

>        relayhost = [a.mx.example.com]
>        smtp_fallback_relay = [b.mx.example.com], [c.mx.example.com]

Ah, we can put two here can we?  Can you put two entries in the relayhost 
section also?  To make matters more complex, we actually have two Postfix 
servers at different sites with different Internet links at each site.  It 
would be nice to do the following:

Main site:
Smarthost to external servers (1 or 2 in any preference)
If unable to connect to either of these servers send the mail to the server at 
the second site (via private link)

Second site:
Same as above but probably no fallback smarthost as I don't want mail loops if 
both Internet connections are down or the two smart hosts go offline.

We are using these two servers as edge servers backing off to an Exchange 
server at the primary site.  We are not deploying Exchange edge servers due to 
the 64-bit requirement as currently we have several well specked machines which 
will run fine with Postfix et al, and I did the same type of thing a few years 
ago with another Unix MTA, but I am getting really used to Postfix config now, 
and want to keep it if possible.

Thanks.
Andrew.

Reply via email to