0

I'd like to be able to reject email from certain users or if it contains certain strings or if the title matches something for certain users.

I'm in a multidomain enviroment.

Is this possible? Unfortunately this (How to configure postfix/dovecot setup to reject certain mail) doesn't fit my needs because it suggests to use header_checks and body_checks to block on certain strings. I could also use smtpd_sender_restrictions to block mails from certain users but not for certain users.

propagare
  • 3
  • 1

1 Answers1

1

Write a milter or content filter for postfix. Milter is easier especially with python and pymilter:

https://pythonhosted.org/pymilter/examples.html

sparse
  • 81
  • 3