Thank you Noel for your reply.  I suppose it's easy enough to write a script 
to generate the virtual_aliases file, but I'm surprised postfix can't 
evaluate the rules for local delivery all the way to the end while the SMTP 
connection is still active.  If that's the case though I'll roll with it.
Again, thank you.
27. Nov 2015 20:43 by [email protected]:


> 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

Reply via email to