Dear Ansgar and everybody else,

in short: I think postfix' behavior reflects a bug, not a feature.
Please, read again my first email. I hope to make it clear with the
following remarks:
 
> $virtual_mailbox_domains lists *domains*, so its content should look
like
> this:
> 
> example.net

I am sorry, you're absolutely right. Actually my mysql tables list only
pure domain names in virtual_mailbox_domains. By accident, I added the
'@' in my first email. Thus, there is no problem in this direction.

> User mappings, including catch-alls, should go into the respective
map.
> In case of virtual mailboxes you must map the catch-all to an existing
mailbox
> in $virtual_mailbox_maps, e.g.:
> 
> f...@example.net  example.net/foo
> b...@example.net  example.net/bar
> @example.net     example.net/bar

As described, I don't have any catch-all in virtual_mailbox_maps. What I
have and what works perfectly is "foo@anotherdomain" in
virtual_mailbox_maps. It is the only mailbox. Since virtual_transport is
"dovecot", there is no need to specify the mailbox name here. However,
if virtual_transport would be "virtual" and if I would specify mailboxes
here, the problem would be exactly the same.

The only catch all is in virtual_alias_maps. This catch-all forwards all
emails from "@domain" to "@anotherdomain", not to a specific user@
anotherdomain.

> A better approach (unless you really need a catch-all, which I somehow
> doubt) would be to auto-generate a virtual alias map by reading the
virtual
> mailbox map and creating a mapping for each address found in it:
> 
> f...@example.com  f...@example.net
> b...@example.com  b...@example.net
> ...

Yes, this would be a nice workaround. But it would be much better, if
postfix would correctly handle virtual alias forwards with the pattern
@domain -> @anotherdomain, with anotherdomain being a virtual mailbox
domain. See my original email for a complete example.

In fact, postfix *ignores* virtual_mailbox_maps when there is a valid
virtual_alias_maps entry pointing to a virtual mailbox domain, thereby
creating mailboxes that should not exist and accepting mail that should
actually be rejected.

I consider this a bug, not a feature. Neither the manual for
virtual_mailbox_maps nor the one for virtual_alias_maps says that the
restriction from virtual_mailbox_maps is being ignored if there is a
valid virtual_alias_maps entry for a virtual_mailbox_domain. Maybe I am
wrong, but I am pretty sure. What do you think?

Kind regards,
Christoph

Reply via email to