OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Postfix overriding masquerade_domains

From: Ahmed RAHAL (arahaltaranis-services.fr)
Date: Thu Jan 19 2006 - 05:53:47 CST


Hi,

I'm having trouble with a postfix setup.
I use this server as an outgoing mail server.
Postfix needs to deliver only local mail.
The trouble I have is : I use domain masquerading for outgoing mail.
Usually, everything is easy and clean. local mail is delivered to
localuserlocalhost.localdomain and outgoing mail is delivered through
an smtp gateway.
On this particular server, masquerading doesn't work. If I set
'masquerade_domains' to anything (existing or not existing domain name)
postfix writes mail out as if the mail came from
localuserlocalhost.localdomain.

example:
say, I want to masquerade my outgoing mail as being from OUTDOMAIN.COM
machine's "official" name is SERVER.LOCAL.DOMAIN.COM

here is my postconf -n (then names have been changed to protect the
innocent):

[rootSERVER postfix]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
masquerade_domains = OUTDOMAIN.COM
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
relayhost = smtp.wanadoo.fr
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

As can be read, I have set "masquerade_domains = OUTDOMAIN.COM" so
outgoing mail should be masqueraded as OUTDOMAIN.COM.
Well, the domain I send out mail with is invariably set to
"SERVER.LOCAL.DOMAIN.COM". Sender address is still
userSERVER.LOCAL.DOMAIN.COM
After that, I tried to set "masquerade_domains = LOCAL.DOMAIN.COM" and
now mail comes from userLOCAL.DOMAIN.COM ! (postconf -n shows the
correct information).

All this is happening on a FedoraCore3. Version is 'postfix-2.1.5-5'

Any hints ?

thanks for your attention,

--
Ahmed RAHAL