I've setup a postfix server which appears to be running fine.
foo.com is its primary domain,bar.com is a secondary domain which used solely
as another name/alias for foo.com.
I have the following functional configuration:
/etc/postfix/main.cf: virtual_mailbox_domains = foo.com
virtual_alias_domains = bar.com virtual_alias_maps =
hash:/etc/postfix/virtual_aliases /etc/postfix/virtual_aliases:
@bar.com @foo.com
This seems to work as intended. Any email that comes in for u...@bar.com is
mapped to u...@foo.com and is delivered to u...@foo.com's mailbox.
The problem comes when an undeliverable email is sent to
unknown_u...@bar.com. Postfix maps it through to foo.com, finds no valid
recipient, then bounces the email.
The bounce message looks like this:
<unknown_u...@foo.com>: unknown user: "unknown_u...@foo.com"
Reporting-MTA: dns; mx.foo.com X-Postfix-Sender: rfc822; p...@example.com
Final-Recipient: rfc822; unknown_u...@foo.com Action: failed
Status: 5.1.1 Diagnostic-Code: X-Postfix; unknown user:
"unknown_u...@foo.com"
The bounce message has rewritten all the bar.com references to foo.com.
Since the sender created an email for unknown_u...@bar.com, I think all the
references to @foo.com in the bounce message are confusing. Furthermore, I'd
like to hide the fact (from the casual user, more or less) that foo.com is
really bar.com.
Is it possible to configure postfix to only do the virtual_alias rewriting
*internally*? In other words, try to forward to foo.com, but on failure send
back a bounce that indicates the user couldn't be found at bar.com?
Thank you!