OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
RE: address rewriting options

wdspublicsafebrowse.com
Date: Wed Sep 06 2006 - 14:40:09 CDT


To avoid virtual alias maps rewriting, I got rid of virtual_alias_domains &
virtual_alias_maps and I added my domain to mydestination (we'll call it
students.example.com). Since postfix receives all incoming mail from our
external filter via the submission port, I added the following overrides in
master.cf:

submission inet n - n - - smtpd -v
 -o sender_canonical_maps=
 -o recipient_canonical_maps=hash:/etc/postfix/recip_canonical
 -o content_filter=

When sending a test message from an external address to
testerstudents.example.com on the submission port, I'm wanting
recipient_canonical_maps to rewrite the recipient to tuser. smtpd's verbose
log shows the mapping succeeds:

postfix/smtpd[2678]: >>> CHECKING RECIPIENT MAPS <<<
postfix/smtpd[2678]: ctable_locate: leave existing entry key
testerstudents.example.com
postfix/smtpd[2678]: maps_find: recipient_canonical_maps:
hash:/etc/postfix/recip_canonical(0,100): testerstudents.example.com =
tuser
postfix/smtpd[2678]: mail_addr_find: testerstudents.example.com -> tuser

but a bit further down the log shows an attempt to deliver to
testerstudents.example.com:

postfix/pipe[2685]: E785A121F22: to=<testerstudents.example.com>,
relay=cyrus, delay=39, status=bounced (data format error. Command output:
tester: Mailbox does not exist )

Why didn't it try to send to tuser?

main.cf includes:
content_filter = smtp:[mailfilter.example.com]
mailbox_transport = cyrus
mydestination = $myhostname, host.example.com, localhost.$mydomain,
localhost, $mydomain, students.example.com
mydomain = example.int
myhostname = host.example.int
mynetworks_style = host
sender_canonical_maps = hash:$config_directory/sender_canonical