Chris St Denis wrote:
I have some email addresses defined (example.com of course is not the
real domain)
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED]
and a catch all to [EMAIL PROTECTED]
when an email is sent to an address like [EMAIL PROTECTED] it gets
sent to [EMAIL PROTECTED]
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:
[EMAIL PROTECTED] [EMAIL PROTECTED]
[EMAIL PROTECTED] [EMAIL PROTECTED]
...
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=<[EMAIL PROTECTED]>, orig_to=<[EMAIL PROTECTED]>, 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
[EMAIL PROTECTED] [EMAIL PROTECTED]
it will redirect the first to the second, even if these aren't your
domains.
[snip]