Dee*_*ksy 1 email-server postfix blacklist
我有一个场景,我需要将一封电子邮件中的电子邮件列入黑名单到我们的本地电子邮件之一。是否可以在 postfix 中阻止这种特定场景?
例如,从 person@fromaddress.com 到 person@ouraddress.com 的电子邮件应该被列入黑名单,但不是来自 person@fromaddress.com 的其他电子邮件。
您可以使用限制类。看:
例如:
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
check_recipient_access hash:/etc/postfix/protected_destinations
...
smtpd_restriction_classes = bad_senders1
bad_senders1 = check_sender_access hash:/etc/postfix/bad_senders1
/etc/postfix/bad_senders1:
person@fromaddress.com REJECT You are not welcome here.
...
/etc/postfix/protected_destinations:
person@ouraddress.com bad_senders1
...
Run Code Online (Sandbox Code Playgroud)
现在,具有“bad_senders1”限制类中的信封发件人地址的电子邮件将被拒绝,但前提是将其发送到“protected_destinations”列表中右侧指定了“bad_senders1”限制类的地址。
请记住为新创建的文件运行postmap。