[Techtalk] postfix

Magni Onsoien magnio+lc-techtalk at pvv.ntnu.no
Mon Jul 13 06:55:37 UTC 2009


On 2009-07-12 10:34:48 -0400, Wolf Rising said:
> I am trying to set up a postfix server, I have two other machines on the
> domain.
> 
> I would like if someone sends mail to user at machine1.domain.com or
> user at machine2.domain.com that it be delivered
> the as if the email had just been sent to user at domain.com.
> 
> Is that possible to do? Or should mail only resolve to domain.com? If I send
> email to user at mail.domain.com
> that gets delivered.

For machine1.domain.com and machine2.domain.com you add MX records,
pointing to the server that serves domain.com.

So if you currently have
server.domain.com.	A	10.1.1.10
machine1.domain.com.	A	10.1.1.11
machine2.domain.com.	A	10.1.1.12
domain.com.		MX	10 server.domain.com.

you just add
machine1.domain.com.	MX	10 server.domain.com.
machine2.domain.com.	MX	10 server.domain.com.

You also need to add machine1 and machine2 to a config file in postfix
to tell that the server should in deed accept mail addresses to those
two machines. (Or you can add the entire domain or an IP block, which
may be easier.)

10 is the priority for the mail server if you have serveral of them;
however, most modern configurations only have one MX (and then you can
choose the priority at random) since it makes spam protection easier. If
you have several MX with different priority (higher number=lower
priority), spammers tend to communicate directly with a lower priority
server, which usually accepts mails more liberally than the main MX
since it may not have the same data in its greylisting/blacklisting
databases and whatnot.



Magni (DNS admin, but not been postmaster for ten years)
-- 
sash is very good for you.


More information about the Techtalk mailing list