|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: mouss (mouss
netoyen.net)
Date: Wed Oct 01 2008 - 14:35:04 CDT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Chris St Denis wrote:
> I have some email addresses defined (example.com of course is not the
> real domain)
>
> david
example.com
> ops
example.com
> ted
example.com
> yolanda
example.com
>
> and a catch all to ops
example.com
>
>
> when an email is sent to an address like yolanda
example.com it gets
> sent to ops
example.com
This is a FAQ. a catchall really means "catch all". and anyway, postfix
has no configuration called "catchall". what you are using is a wildcard
virtual alias. and virtual aliases apply to all mail.
What you want is an "identity mapping" (map an address to itself) for
valid addresses:
david
example.com david
example.com
ted
example.com ted
example.com
...
These will prevet the wildcard alias from being used (because a match is
found and alias expansion stops since the result contains the key).
since you store users in postgres, you can use something like this:
virtual_alias_maps =
proxy:pgsql:/usr/local/etc/postfix/pgsql_identity_mapping.cf
cdb:/usr/local/etc/postfix/virtual_alias
where the pgsql_identity_mapping.cf has a query that returns the user
(which is the key of the search query) if it is found in your virtual
mailbox table:
...
query = select %s from yourvirtualmailboxtable where '%s' = email
This has been discussed here many times. you may find more infos in the
archives (search for catchall and/or "identity mapping").
>
> Oct 1 11:11:35 barium postfix/pipe[53799]: DFC9410E463:
> to=<ops
example.com>, orig_to=<yolanda
example.com>, relay=maildrop,
> delay=0.06, delays=0.01/0/0/0.04, dsn=2.0.0, status=sent (delivered via
> maildrop service)
>
> Why is it delivering to the catch all instead of the virtual_mailbox
> account?
>
virtual_alias_maps apply to _all_ mail. yes, _all_ mail. so if you do
foo
yahoo.com bar
gmail.com
it will redirect the first to the second, even if these aren't your
domains.
> [snip]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]