Thanks for looking into this and thank you Peter for reporting my
issue to the list.

To confirm, the alias is in the last database (
hash:/etc/postfix/virtual_alias_maps ) but the forwarding only works
if "receive_override_options = no_address_mappings" is NOT set
(commented out). And for the forwarding to actually happen the
content_filter must be disabled (unless there is a valid daemon
listening and re-injecting, etc). If no_address_mappings is enabled,
the message bounces with user unknown error.

virtual_alias_maps = pgsql:/etc/postfix/pgsql_virtual_alias_maps.cf
hash:/etc/postfix/virtual_alias_maps

Re: content_filter -- yes, I did uncomment this setting when
submitting the configuration to provide a fuller picture of my setup.
However, as you noted, the log entries were generated without the
content_filter set. Apologies for the confusion.

On Mon, Dec 30, 2019 at 8:51 AM Viktor Dukhovni
<postfix-us...@dukhovni.org> wrote:
>
> On Mon, Dec 30, 2019 at 10:52:28PM +1300, Peter wrote:
>
> > > The reported symptoms are not consistent with content_filter being set
> > > for the message.
> >
> > Yes, but does it preempt the resolution of whether a recipient exists at
> > all?  I thought that was done in smtpd, not qmgr.  I believe there might
> > be an implicit check_recipient_access on the end of
> > smtpd_recipient_restrictions that does that, but I'm not sure.
>
> The existence checks in smtpd(8) are not affected by
> receive_override_options.  The virtual alias tables are consulted as
> appropriate.  In any case, the message was accepted.
>
> In more sophisticated configurations, I've used different definitions of
> virtual_alias_maps in smtpd(8) and cleanup(8), with the one used by
> smtpd(8) used only for existence checks, avoiding expansion of LDAP
> groups, ...  But since I wanted spam filtering (in particular a spam
> quarantine) per-user, I did not use no_address_mappings.
>
> > The idea being that a message needs to be rejected before it hits the
> > queue?
>
> This is why virtual_alias_maps is still used by smtpd(8) as part of
> recipient validation.
>
> > That said the logs do show the message going straight into qmgr, so I'm
> > really just baffled here.
>
> The reported symptoms are not consistent with the use of a
> content_filter.
>
> --
>     Viktor.

Reply via email to