On Mon, Nov 11, 2013 at 07:18:01PM +0100, Ansgar Wiechers wrote:

> > 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?
> 
> You're free to file a bug report, but I can practically guarantee you
> that it will be discarded, since the virtual mailbox configuration
> example in the VIRTUAL_README clearly tells you not to do what you're
> doing.

It is not entirely unreasonable to expect address validation to
handle 1-to-1 aliasing of @example.org with @example.net.  So I
would not say that the request will be discarded, but a correct
implementation of such rewriting would be a major change in Postfix
internals and user interface and would be more than a "bug fix".

Perhaps in Postfix 3.0 (yes I do recall the thread where nobody
voted for 3.0).  Arguably, since canonical mapping is restricted
to be 1-to-1, Postfix smtpd(8) could expand canonical mappings
before validating addresses, but it is not clear that this would
be sufficient.

Validation with 1-to-many mappings (virtual rewriting) is a pain.
You pay the full cost of expanding a large group just to verify
that it exists,  such expansion can be rather time consuming.  SMTP
clients are generally more patient after "." than after "RCPT TO".

I've built configurations where smptd(8) sees a different definition
of virtual_alias_maps than cleanup(8).  The smtpd(8) version just
checks for a group's existence (maps mail->mail), while the cleanup(8)
version expands the group to its list of members (maps mail->{member-maildrop}).

Suffice it to say that for the moment people have learned to live
with the limitation.

Perhaps the right solution is to define a new 1-to-1 rewriting
mechanism that is applied to "RCPT TO" directly by smtpd(8) before
validation.  This would be a more suitable mechanism for the task
than smtpd_command_filter that would be more accurate than fiddling
with regexps and can use additional lookup tables.

Anyway this requires new inspiration to build just right the first
time.

-- 
        Viktor.

Reply via email to