I followed this (https://workaround.org/ispmail/squeeze/big-picture) tutorial to set up my mailserver and it works very well.
I'd like to be able to reject email from certain users or if it contains certain strings or if the title matches something.
Is this possible?
I am using MySQL for users and am in a multidomain env.
#/etc/postfix/main.cf header_checks = regexp:/etc/postfix/header.re smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/blacklisted_roles #/etc/postfix/header.re /^Subject:(.*) offensive_word / REJECT Inappropriate word #/etc/postfix/blacklisted_roles [email protected] REJECT
Thank you for the question and answer. I have similar problem to solve, but have to filter connection from mobile devices to my postfix/dovecot based on username and reject ones that are not in the list. Any ideas how to do it? Let me know.