Multiple server in transport file

Ronny T. Lampert telecaadmin at gmail.com
Sat May 17 08:13:05 IST 2008


> Hi everyone. I am starting to relay for a domain that uses multiple 
> front end mail servers to accept mail mainly for redundancy purposes. In 
> the transport file, the domains I am relaying for are currently setup 
> like this:
 >
> domain.com smtp:[mx1.domain.com]
> 
>  
> 
> If I wanted to enter more than one mail server for domain.com, how do I 
> do it? If its not possible does anyone else have any workarounds?


If you do not want to mess around with DNS, here is the direct config 
file approach:

Create a new protocol name (say fstmp - fallback smtp), let it be a SMTP 
transport and tell _that exact_ transport to use certain fallbacks.
As such those fallbacks will not affect your main SMTP transports which 
is very important.


How to do that:
Copy the smtp line in /etc/postfix/master.cf and rename it to fsmtp or 
so (all with tabs, beware the line-break!) and append the -o 
smtp_fallback_relay parameter:

fsmtp      unix  -       -       n       -       -       smtp
         -o smtp_fallback_relay=[1.2.3.2],[1.2.3.3]


and in /etc/postfix/transport


domain.com	fsmtp:[1.2.3.1]


So you now usually will use 1.2.3.1 as primary relay, but if that goes 
down, postfix will check the .2 and .3!

Cheers,
Ronny


More information about the MailScanner mailing list