On 7/19/2012 4:11 PM, lutz.niede...@gmx.net wrote:
> Hi!
> 
> We do have several domains listed with mydomains.  The users are the same for 
> all domains and exist locally, means mail gets delivered locally.  Aliases 
> file is used to expand to lists of recipients.  This works ok and we only 
> have one set of files (aliases) that works for all domains.
> 
> We will now add another domain.  All users are again local and are the same 
> as with the domains above.  All domains use info@ and contact@ and deliver to 
> the same group of recipients.
> Now for this one domain info@ and contact@ should be delivered to other 
> users.  It would be great if we could write the following into the aliases 
> file (I know it does not work):
> info: user1, user2
> contact: user3, user4
> info@this_other_domain.com: john, jane
> contact@this_other_domain.com: john, pete
> 
> Can we use virtual_alias_maps for this?  Without using virtual_alias_domains? 
>  Is there still a processing of aliases file?  Is that before or after 
> virtual_aliases_maps?
> 
> Is virtual_aliases_maps the correct way to handle these two exceptions or 
> would you do it another and better way?
> 
> Thanks,
> -lutzn
> 
> 


Yes, virtual_alias_maps is the correct solution for general-purpose
address rewriting.  The domain does not need to be listed in
virtual_alias_domains.

In general, it's good practice to always use address@domain rather
than just bare usernames in virtual_alias_maps:
i...@example.com   user1@localhost, us...@hotmail.com
Note there is no ":" separator used in this file.

If the rewritten address is delivered locally, that address will
then be subject to rewriting by the usual aliases file.


http://www.postfix.org/ADDRESS_REWRITING_README.html
http://www.postfix.org/OVERVIEW.html



  -- Noel Jones

Reply via email to