我需要反弹通过我的Postfix服务器在“收件人”和“抄送”字段中具有太多独特域名的邮件。 Postfix有没有简单的方法? (我是Postfix的新手,通常是sendmail用户)。
添加/编辑
To / CC:[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],User8 @ exampleH。 com,[email protected],[email protected],[email protected]
应该反弹给用户。
To / CC:[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],User8 @ exampleA。 com,[email protected],[email protected],[email protected],[email protected]
应该通过。
没有简单的方法来做到这一点。 在Postfix中,在接受或拒绝收件人之前,没有任何机制可以对收件人进行统计。 必须记住,Postfix是一个邮件服务器,只有有限的内容检查的可能性。
要做到这一点,你可以添加队列之前(写你自己的),或看看政策服务的可能性(写你自己的)。 最简单的方法就是使用简单的Perl脚本或者任何您喜欢的方法来实现策略服务。 在Postfix 文档中可以find具有示例Perl实现的整个文档 。 还有其他的实现使用相同的接口,但不做你想要在你的特殊情况下。 一个是policyd-weight 。
如果您熟悉编写SpamAssassin规则,则可以尝试添加一个,并使用amavisd-new作为之前的队列filter。
但正如我所说,你的情况没有内置的解决scheme。 你的问题的其他答案只是全球性的限制,在这里没有帮助。
使用smtpd_recipient_overshoot_limit(和smtpd_recipient_limit)
smtpd_recipient_overshoot_limit (1000) The number of recipients that a remote SMTP client can send in excess of the limit specified with $smtpd_recipient_limit, before the Postfix SMTP server increments the per-session error count for each excess recipient.
检查:
smtpd_client_recipient_rate_limit(默认:0)
无论Postfix是否实际接受这些收件人,每个时间单元允许任何客户端发送到此服务的收件人地址的最大数量。 时间单位是使用anvil_rate_time_unitconfiguration参数指定的。 默认情况下,客户端可以发送Postfix可以接受的每个时间单位的收件人地址。
要禁用此function,请指定一个0的限制。
smtpd_client_message_rate_limit(默认:0)
无论Postfix是否实际接受这些消息,允许任何客户端以每个时间单位对此服务进行的最大数量的消息传递请求。 时间单位是使用anvil_rate_time_unitconfiguration参数指定的。 默认情况下,客户端可以发送Postfix可以接受的每个时间单位的多个消息传递请求。 要禁用此function,请指定一个0的限制。
正如postconf手册页所示。