|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Virtual Delivery Order + Wildcard Aliases
From: Ryan C. Creasey (ryan
p11.com)
Date: Mon Dec 01 2003 - 18:18:22 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I'm working on a new implementation of postfix with a pgsql backend.
I've done it with mysql before, but this time I want to treat all
ingress mail as virtual. Everything's going great so far, but I've
recently hit a snag.
If I have my virtual mailboxes set like so:
postfix=# select address, home from view_postfix_users ;
address | home
-----------------+------------------------
ryan
p11.com | /p11.com/ryan/Maildir/
support
p11.com | /p11.com/support/Maildir/
And my virtual aliases like so:
postfix=# select * from view_postfix_aliases ;
address | destination
----------+--------------------------
p11.com | ryan
p11.com
With the intention on having two mailboxes; 'ryan
p11.com' and
'support
p11.com' (both delivering to local users 'ryan' and 'support'
respectively), and a wildcard alias of '
p11.com'.
The problem I'm running into is that the wildcard alias is being greedy
and matching 'support
p11.com' and relaying it to 'ryan
p11.com'. My
assumption is that postfix is searching the alias table before the
mailbox table, but I could be way off. However, if I delete the alias,
ingress mail bound to 'support
p11.com' delievers to the mailbox normally.
Is there a specific config option to specify the order in which these
tables are referenced? I believe I heard exim being able to do this,
but I don't want to have to learn another mta. :) Again, I could be
*waaay* off and would love to have someone set me straight.
Here's a peek at my configuration (let me know if I need to be more
verbose):
root
hastur.p11.com:/etc/postfix# grep virtual main.cf
local_transport=virtual
virtual_mailbox_base=/usr/home/mail
virtual_mailbox_maps=pgsql:/etc/postfix/virtual_mailbox_maps.pgsql
virtual_mailbox_domains=pgsql:/etc/postfix/virtual_mailbox_domains.pgsql
virtual_uid_maps=pgsql:/etc/postfix/virtual_uid_maps.pgsql
virtual_gid_maps=pgsql:/etc/postfix/virtual_gid_maps.pgsql
virtual_alias_maps=pgsql:/etc/postfix/virtual_alias_maps.pgsql
virtual_transport = virtual
root
hastur.p11.com:/etc/postfix# cat virtual_mailbox_maps.pgsql
table = view_postfix_users
select_field = home
where_field = address
root
hastur.p11.com:/etc/postfix# cat virtual_alias_maps.pgsql
table = view_postfix_aliases
select_field = destination
where_field = address
Thanks!
--
Ryan C. Creasey
Network Engineer
p11creative
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]