> -----Original Message-----
> From: owner-postfix-us...@postfix.org [mailto:owner-postfix-
> us...@postfix.org] On Behalf Of Andy Brody
> Sent: Thursday, 29 November 2012 12:33 PM
> To: postfix-users@postfix.org
> Subject: Relay through multiple addresses without DNS
> 
> Hi Postfix users,
> 
> I'm configuring a postfix server in an environment with no access to
> DNS, and I'd like it to be able to load balance between relay addresses
> listed in /etc/hosts. While I could run a lightweight DNS server on the
> machine, I'd prefer not to add that complexity if it can be avoided.
> 
> Selected postconf:
> mail_version = 2.7.0
> disable_dns_lookups = yes
> relayhost = [relay.local]
> 
> In /etc/host.conf:
> multi on
> 
> In /etc/hosts:
> 1.1.1.1 relay.local
> 2.2.2.2 relay.local
> 3.3.3.3 alt-relay.local
> 4.4.4.4 alt-relay.local
> 
> Getaddrinfo appears to return both addresses:
> $ python -c 'import socket; print socket.getaddrinfo("relay.local", 25,
> socket.AF_INET, socket.SOCK_STREAM)'
> [(2, 1, 6, '', ('1.1.1.1', 25)), (2, 1, 6, '', ('2.2.2.2', 25))] $
> ./getaddrinfo relay.local
> Hostname:     relay.local
> Addresses:    1.1.1.1 2.2.2.2
> 
> But postfix only tries 1.1.1.1. I've set 1.1.1.1 to a blackhole
> address, in which case the mail does not go through.
> 
> I tried adding:
> smtp_fallback_relay = [alt-relay.local]
> 
> This causes postfix to retry with 3.3.3.3, but even if 3.3.3.3 is
> blackholed, it has not yet tried 4.4.4.4.
> 
> Is there some other directive I am missing? Is this behavior by design?
> 

I do this with about a dozen servers, and I make full use of transport tables. 
Only the gateway MTA will use DNS.

Try man 5 transport

> Thanks,
> Andy
> 


===[Disclaimer]=== 
This electronic transmission, including any attachments, is confidential, may 
contain privileged information and should be read or retained only by the 
intended recipient. If you received this message in error, please delete it 
from your system and notify the sender immediately. Any review, dissemination 
or other use of this information by persons or entities other than the intended 
recipient is strictly prohibited. 
===[End]=== 

Reply via email to