failover relayhost

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

failover relayhost

James D. Parra
Hello All,

I am using a postfix instance to relay email from various servers and today I ran into an issue where the relay server, although pingable, was not responding and therefor not relaying email.

Would having the following entries in the main.cf allow the other servers, that cannot connect to the main relayhost server, use a secondary relayhost server to send email?

<snip>
relayhost = relayserver1.mydomain.com
smtp_fallback_relay = relayserver1.mydomain.com
<smtp>

All the postfix servers need to do is relay mail.

Thank you for your help.

Best regards,

James
Reply | Threaded
Open this post in threaded view
|

Re: failover relayhost {corrected}

James D. Parra
Actually, let me fix the typo. My apologies.

~~~~
Hello All,

I am using a postfix instance to relay email from various servers and today I ran into an issue where the relay server, although pingable, was not responding and therefor not relaying email.

Would having the following entries in the main.cf allow the other servers, that cannot connect to the main relayhost server, use a secondary relayhost server to send email?

<snip>
relayhost = relayserver1.mydomain.com
smtp_fallback_relay = relayserver2.mydomain.com
<smtp>

All the postfix servers need to do is relay mail.

Thank you for your help.

Best regards,

James
Reply | Threaded
Open this post in threaded view
|

Re: failover relayhost {corrected}

Viktor Dukhovni


> On Jun 7, 2018, at 9:33 PM, James D. Parra <[hidden email]> wrote:
>
> Would having the following entries in the main.cf allow the other servers, that cannot connect to the main relayhost server, use a secondary relayhost server to send email?
>
> <snip>
> relayhost = relayserver1.mydomain.com
> smtp_fallback_relay = relayserver2.mydomain.com
> <smtp>

Yes, but if these are "hostnames", i.e. no MX lookups
are intended, the correct syntax is:

> relayhost = [relayserver1.mydomain.com]
> smtp_fallback_relay = [relayserver2.mydomain.com]

You can also just configure an MX RRset:

  relay.mydomain.com. IN MX 10 relayserver2.mydomain.com.
  relay.mydomain.com. IN MX 20 relayserver1.mydomain.com.

and use "relay.mydomain.com" without "[]".  You can also
load-balance the MX hosts by giving them equal preferences.

--
        Viktor.