Em 24/08/2022 10:08, Ivars Strazdins escreveu:
Hello Postfix Experts,
let’s say that domain.com <http://domain.com> is Postfix $mydomain.
I know that it is possible to protect /etc/postfix/protected_destinations from external senders, as per https://www.postfix.org/RESTRICTION_CLASS_README.html

But is it possible to limit users from the same domain who can send mails to an internal email distribution list?
In other words, is it possible to setup Postfix so that
[email protected] CAN send an email to /etc/postfix/protected_destinations
[email protected] CANNOT send an email to [email protected]

[email protected] is a simple Postfix alias.

Thanks for your time,
Ivars

Hi, yes, you can.

main.cf:

smtpd_restriction_classes = insiders_only
insiders_only = check_sender_access hash:/etc/postfix/insiders, reject
...
...
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations
    ...
    ...

/etc/postfix/insiders:

[email protected]   OK
[email protected]    OK

/etc/postfix/protected_destinations:

[email protected]    insiders_only
[email protected]    insiders_only

$ postmap /etc/postfix/protected_destinations
$ postmap /etc/postfix/insiders
$ postfix reload

----------------------------------
    _    Engº Julio Cesar Covolato
   0v0<[email protected]>
  /(_)\  F: 55-11-99175-9260
   ^ ^   PSI INTERNET
----------------------------------

Reply via email to