On 2022-08-22 Ruben Safir wrote:
> On Mon, Aug 22, 2022 at 08:50:51AM +0200, Ansgar Wiechers wrote:
>> You could use a check_sender_access restriction with a regular
>> expression like this:
>>
>> /bagel/ REJECT
>
> Do I use the map created by the postfix/access file for this?

Depends on your configuration. If the file is a "normal" hash map, which
would be referenced in your main.cf somewhat like this:

smtpd_recipient_restrictions =
  ...
  check_sender_access hash:/etc/postfix/access

then you can't add a regular expression rule there. Instead create a new
file with that rule (e.g. /etc/postfix/access.pcre) and add that file to
your main.cf like this:

smtpd_recipient_restrictions =
  ...
  check_sender_access hash:/etc/postfix/access
  check_sender_access pcre:/etc/postfix/access.pcre

Running postmap is not needed for regexp and pcre access maps.

Regards
Ansgar Wiechers
-- 
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky

Reply via email to