Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

postfix config



Bill Holt wrote:
>Matthew Valites writes:
>>If you just want to make sure that mail gets delivered when your primary 
>>mail server goes down, you should set up the secondary server as a 
>>backup MX.
> 
> ...the outside world will be accessing my mail gateway via the MX record. 
> The gateway will process incoming mail for spam, then relay it to the server
> listed in the transport file.
>
> Now the question was and is, is it that the transport file only allows 
> a one to one mapping (example.domain smtp:1.1.1.1) or a one to many mapping
> (example.com smtp:1.1.1.1, 1.1.1.2) or something different....

I believe it is one-to-one, or via a regular expression map, 
many-to-one, though for a definitive answer, post your question to the 
Postfix users mailing list. Even if the syntax supported it, I wouldn't 
necessarily expect the end result to be MX-like behavior. It might, for 
example, just pick one of the two destinations at random, just as a 
multi-homed host is treated, or MX records with equivalent preferences. 
(Remember, you need a mechanism to specify priority.)

As Matthew Valites points out, an MX record is the behavior you are 
seeking. Just because your Exchange servers are internal to your network 
doesn't mean you can't use an MX record. In your transport file just list:

example.com smtp:exchange.example.com

and then setup either:

exchange	MX	10	exch1.example.com
exchange	MX	20	exch2.example.com
exch1		A	1.1.1.1
exch2		A	1.1.1.2

on the internal side of a "split horizon" DNS setup, or create a 
subdomain, with a corresponding internal content server.

If you really want to avoid using DNS, you might be able to hack 
together the equivalent behavior by using the relayhost mechanism
(http://www.postfix.org/postconf.5.html#relayhost) instead of a 
transport table entry, and then use fallback_relay 
(http://www.postfix.org/postconf.5.html#fallback_relay) to specify the 
backup Exchange server. Though this is a contortion of what relayhost 
was intended for (you'd have to adjust other directives so the gateway 
doesn't think mail for example.com is local) and if you use this gateway 
to relay outbound mail, I think it'll break.

  -Tom




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org