|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Virtual Delivery Order + Wildcard Aliases
From: Kyle Dent (kdent
seaglass.com)
Date: Tue Dec 02 2003 - 10:54:29 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, 1 Dec 2003, Ryan C. Creasey wrote:
> 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.
>
> [...]
Virtual aliases are checked before virtual mailboxes. You can get
around your problem by listing all of your virtual mailbox
address along with your virtual aliases. With Postfix maps, it
would look like this:
# virtual mailboxes
ryan
p11.com /p11.com/ryan/Maildir/
support
p11.com /p11.com/support/Maildir/
# virtual_aliases
p11.com ryan
p11.com
ryan
p11.com ryan
p11.com
support
p11.com support
p11.com
Construct your pgsql queries to return the same results.
Kyle
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]