0

Using Postfix (version 2.10.2.2, part of a Zimbra installation) on Ubuntu I would like to be able to achieve the following:

If an email originates from userA@example.com that targets userB@example.com generate a non delivery report simulating that the address userB@example.com does not exist on this server (any longer).

Background: One of my users does not want to receive any more email from a certain sender anymore but wants to keep the current address active.

masegaloeh
  • 18,236
  • 10
  • 57
  • 106
HenningM
  • 3
  • 2

1 Answers1

0

Using restriction class feature from postfix

In main.cf

smtpd_restriction_classes = selective_sender
selective_sender = check_sender_access hash:/etc/postfix/blocked_sender

# put in smtpd*restriction
    ...
    check_recipient_access hash:/etc/postfix/recipient_access
    ...

In /etc/postfix/recipient_access:

joe@example.com       selective_sender

In /etc/postfix/blocked_sender:

baduser@example.org     REJECT unknown_user
masegaloeh
  • 18,236
  • 10
  • 57
  • 106