On 11/27/2015 10:36 PM, par wrote: > 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] <mailto:[email protected]> is mapped to [email protected] > <mailto:[email protected]> and is delivered to [email protected] > <mailto:[email protected]>'s mailbox. > > The problem comes when an undeliverable email is sent to > [email protected] <mailto:[email protected]>. Postfix maps it > through to foo.com, finds no valid recipient, then bounces the email.
Yes, that's the problem with wildcard rewrites; postfix cannot validate the recipient before delivery, making you a backscatter source. Rather than wildcard rewrites, use 1-1 user mappings. If there are more than a handful, use your favorite scripting language to create the file automatically. [email protected] [email protected] [email protected] [email protected] ... -- Noel Jones
