When postfix checks for a local user it looks at any local user (like 
/home/fred), I assume by checking /etc/passwd or similar (I have local users 
who can receive mail who are not mentioned in any /etc/postfix/* file, so 
postfix knows about them from somewhere outside of postfix’s config file) and 
then it also checks for virtual_mailbox_domains and virtual_alias_maps, yes?

If a user lookup matches in BOTH locations due to a misconfiguration, which one 
“wins”? Can I simply add user@$mydomain to the sql maps and they will trigger, 
or do I have to do something to tell postfix not to use the local home for that 
user first? (Not literally $mydomain, obvs).

Is it possible to prevent delivery to a local user and force the local domain 
to be resoled through virtual_mailbox_domains and virtual_alias_maps or does 
this require disabling local delivery to the entire $mydomain at once? Or, can 
I trick it by using virtual?

user@$mydomain  user@<virtual domain managed by myslq>.tld

So, if I have u...@example.com and u...@example.net and .net is handled in 
mysql through virtual_mailbox* and u...@example.com has mail put in /home/user 
because example.com is $mydomain how would I set postfix up so that even though 
/home/user is the user’s home folder, their mail would be in 
virtual_mailbox_base only and handled via MySQL? (And yes, I realize the user’s 
mail would not be available via a shell login, that is rather the point).

What I currently have that seems relevant:

virtual_alias_maps =
    hash:$config_directory/virtual
    proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_alias_domains = kreme.com
virtual_gid_maps = static:89
virtual_mailbox_base = /usr/local/virtual
virtual_mailbox_domains = 
proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = 
proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 89
virtual_uid_maps = static:89
virtual_transport = dovecot

Hopefully I explained this question well enough.

Reply via email to