OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
How to achieve alternative masquerade functionality? (apply to a limited set of hosts)

From: Simon J Mudd (sjmuddpobox.com)
Date: Thu Sep 01 2005 - 11:10:37 CDT


Postfix allows mail originating from servers with a certain subdomain to
have headers and addresses modified so they appear to originate from the
domain rather than the hostname itself.

It is possible to exclude certain addresses from this masquerade process
by username.

At my office our Postfix server is used as BOTH an internal/external
gateway hiding MS Exchange and Lotus Notes server which are inside. We
also have a large number of unix servers which send status mails to a
"reporting server". All internal mail servers use the Postfix mail server
as the internal mailrelay.

We have been using the masquerading functionality for a limited set of
hosts which mail to the outside world and here we want to hide the host
details from the mails.

However other unix hosts in the same domain (which are not able to send to
the outside world) are also affected by the masquerading and this is
causing us trouble as the "reporting server" is unable to identify the
origin of various messages.

I can temporarily fix the problem by adjusting the masquerading exceptions
list to include the appropriate "users" which send email. However I would
really prefer to specify a specific list of hosts to which masquerading
SHOULD be applied and not apply it to all others. Is this possible?

My other idea is to have 2 Postfix instances and perform masquerading ONLY
on the internal <--> external instance and make all other mail servers
used the internal instance for routing mail internally. This is not too
difficult to setup but it would be much cleaner to only have to configure
a single postfix instance.

Can I get Postfix to provide the functionality I want without configuring
2 instances?

Regards,

Simon