On Mon, Sep 21, 2020 at 11:15:01AM -0400, Wietse Venema wrote:
> > > I don't know what you're finding surprising here. There's no magic, the
> > > restrictions are evaluated *exactly* as written. There's no mention
> > > of virtual here, so for remote senders, only recipients listed in
> > >
> > > check_recipient_access pcre:/etc/postfix/local_recip_map,
> > >
> > > are permitted and all others are rejected.
> >
> > Okay, at the risk of sounding redundant and perhaps obtuse, there's no
> > way to have a catch-all for one domain while having recipient
> > restrictions for others?
>
> Of course there is, you just add the domain wildcard to local_recip_map.
>
> LHS RHS
> =====================
> example.com permit
In this particular case, given that the existing rule uses a PCRE table,
rather than easy to make mistakes with patterns, I'd recommend just
using an "inline" table above the final "reject" rule:
check_recipient_access inline:{example.com=OK},
or, if you like more whitespace:
check_recipient_access inline:{ { example.com = OK } },
but the correct PCRE pattern would be:
/@example\.com$/ OK
--
Viktor.