block sender/receiver pairs

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

block sender/receiver pairs

Stefan Sticht
Hi,


I need to block certain combinations of sender/receiver on a postfix
MTA. What would be the best way?


Cheers,


Stefan

Reply | Threaded
Open this post in threaded view
|

Re: block sender/receiver pairs

Ansgar Wiechers
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<----
[hidden email] rc_foo
---->8----

In foo_sender_access:

----8<----
[hidden email] REJECT Mail not accepted.
[hidden email] REJECT Mail not accepted.
---->8----

Regards
Ansgar Wiechers
--
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky
Reply | Threaded
Open this post in threaded view
|

Re: block sender/receiver pairs

Wietse Venema
In reply to this post by Stefan Sticht
Stefan Sticht:
> Hi,
>
>
> I need to block certain combinations of sender/receiver on a postfix
> MTA. What would be the best way?

www.postfwd.org

        Wietse