[英]Postfix: block incoming mail based on recipient email and sender IP address
I am running a shared hosting environment (web + email). 我正在运行一个共享的托管环境(Web +电子邮件)。 Some of the domains being hosted have elected to use third-party spam filtering and some have not. 托管的某些域选择使用第三方垃圾邮件筛选,而某些则没有。
In order for the spam filtering on these domains to be effective, the server should reject any messages that did not originally go through the spam filter servers. 为了使这些域上的垃圾邮件过滤有效,服务器应拒绝最初未通过垃圾邮件过滤服务器的任何邮件。 Ie they did not arrive from specific IP addresses, and don't contain specific headers. 也就是说,它们不是来自特定的IP地址,也不包含特定的标头。
How can I block incoming mail for these specific domains , unless the mail arrives from the spam filtering servers? 除非邮件来自垃圾邮件过滤服务器,否则如何阻止这些特定域的传入邮件?
I obviously can't add firewall rule(s), because some of our hosted domains don't use the filtering service. 我显然不能添加防火墙规则,因为我们的某些托管域不使用过滤服务。 Firewall rules blocking port 25 etc would stop their email arriving. 防火墙规则阻止端口25等将阻止其电子邮件到达。
It needs to be a filter based on 1) the email recipient domain name, and 2) a specific list of IP addresses. 它必须是基于1)电子邮件收件人域名和2)IP地址的特定列表的过滤器。 For example, if domain is in a list of filtered domains, then check IP address. 例如,如果域位于已过滤域的列表中,则检查IP地址。 If IP address is NOT in list of spam filtering servers, reject the message. 如果IP地址不在垃圾邮件过滤服务器列表中,则拒绝该消息。
Can anyone point me in the right direction? 谁能指出我正确的方向?
Thanks! 谢谢!
I'm looking at doing this right now. 我现在正在考虑这样做。 Does this suggestion help: use postfix restriction classes. 此建议是否有帮助:使用后缀限制类。 Put mail domains that need restricting to your spam filter servers in a separate class, then handle it differently. 将需要限制垃圾邮件过滤器服务器的邮件域放在单独的类中,然后以不同的方式处理。 See http://permalink.gmane.org/gmane.mail.postfix.user/148366 and http://www.postfix.org/RESTRICTION_CLASS_README.html 请参阅http://permalink.gmane.org/gmane.mail.postfix.user/148366和http://www.postfix.org/RESTRICTION_CLASS_README.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.