On 2018-08-27 Stefan Sticht wrote:
> I need to block certain combinations of sender/receiver on a postfix
> MTA. What would be the best way?

Not sure this is the best way, but I'm using restriction classes for
things like that.

In main.cf:

----8<----
smtpd_restriction_classes = rc_foo
rc_foo = check_sender_access hash:/etc/postfix/foo_sender_access
smtpd_recipient_restrictions =
  permit_mynetworks
  permit_sasl_authenticated
  reject_unauth_destination
  ...
  check_recipient_access hash:/etc/postfix/recipient_access
  ...
---->8----

In recipient_access:

----8<----
f...@example.org rc_foo
---->8----

In foo_sender_access:

----8<----
b...@example.com REJECT Mail not accepted.
some...@example.net REJECT Mail not accepted.
---->8----

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

Reply via email to