On 9/28/2009 10:23 AM, Mark Baxter wrote:
Hi,

I am currently using Postfix to relay email to a remote SMTP server run
by the company I work in (we use it for sending Nagios notifications).
As this network connection is occasionally not so reliable we would like
to use a 3G connection as a backup network connection and doing so would
require using the mobile company’s SMTP server.

After searching online and reading a lot it seemed to me that, assuming
that the company’s SMTP server is 100.100.100.100 (for one reason or
another we use the IP address rather than FQDN) and the 3G operator’s
SMTP server is smtp.3g.com, what I needed was this in the Postfix
configuration:

relayhost = 100.100.100.100

smtp_fallback_relay = smtp.3g.com

The idea being that when the link to 100.100.100.100 is down (as in that
network connection is down) the machine failsover its network
connectivity to the 3G one and uses smtp.3g.com.

Now, the network failover is working fine (this is on Ubuntu 9.04). No
problems there at all. My problem is that Postfix is still trying to
relay to 100.100.100.100. I tested this by pulling out the network
cable. The ethernet link was down and the machine was using the 3G network.

Postfix will always attempt to connect to $relayhost, and will only use smtp_fallback_relay if it can't connect to the relayhost at all.

If postfix is able to connect to 100.100.100.100 via the 3G connection, the fallback settings will never be used - even if the actual mail transfer fails.

If you need more help, please show "postconf -n" output and logging demonstrating the problem.


  -- Noel Jones

Reply via email to