我遵循这个( https://workaround.org/ispmail/squeeze/big-picture )教程来设置我的邮件服务器,它工作得很好。
我希望能够拒绝来自某些用户的电子邮件,或者如果它包含某些string或标题匹配的东西。
这可能吗?
我正在使用MySQL的用户,并在多域环境。
您可以使用header_checks和body_checks来阻止某些string。 更多信息在这里 。 您可以使用smtpd_sender_restrictions阻止来自某些用户的邮件。 更多信息在这里 。
#/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