# [postfix/courier/mysql] Mail filtering and "default domain"

## netcrusher

Hi,

I have successfully set up a virtual mail server according to the great howto in the Wiki (postfix, courier, authdaemon, smtp-auth, mysql, roundcube). I have three questions remaining:

I have a virtual domain mail.example.com and a canonical domain of example.com. Now, I would like to have mail.example.com as my "default" virtual domain. I have already read on address rewriting but would like to reassure that this is possible and I go the right path. 

MUAs are still using the full virtual domain of mail.example.com for setting up my server (default anyway)

Any incoming mail to example.com should be rewritten to mail.example.com

Any outgoing mail from mail.example.com should be rewritten to example.com (masquerade_domains?)

I have currently aliased postmaster as admin in /etc/mail/aliases. Am I right in thinking this only applies to my canonical domain example.com? How can I route postmaster@example.com to admin@mail.example.com?

I would like to filter mail in a specific account upon receipt. How could I best accomplish this? Filtering in the MUA is not an option since I have multiple devices. (Subscribed to quite some mailing lists => many incoming mails)

Feel free to ask for further information, I often forget to include information in my initial posts.

Thank you very much for your kind support!

netcrusher

EDIT: Seems like the "default" virtual domain can easily be solved through the transport setting (local/virtual/relay) -- please forgive my stupidity!

----------

## hydrapolic

Maybe just use the domain example.com and deliver using virtual.

----------

