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 [email protected] is 
mapped to [email protected] and is delivered to [email protected]'s mailbox.
The problem comes when an undeliverable email is sent to 
[email protected].  Postfix maps it through to foo.com, finds no valid 
recipient, then bounces the email.
The bounce message looks like this:
    <[email protected]>: unknown user: "[email protected]"    
Reporting-MTA: dns; mx.foo.com    X-Postfix-Sender: rfc822; [email protected]  
      Final-Recipient: rfc822; [email protected]    Action: failed    
Status: 5.1.1    Diagnostic-Code: X-Postfix; unknown user: 
"[email protected]"
The bounce message has rewritten all the bar.com references to foo.com.
Since the sender created an email for [email protected], 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!

Reply via email to