我试图在Zimbra中设置一个policyd策略,为给定的发件人(user @ domain)设置最大数量的出站电子邮件。 我正在用一个简单的脚本testing它,login到SMTP服务器并发送testing邮件。 我注意到,如果我省略login信息,SMTP请求被拒绝(授权失败),但policyd配额计数器仍然递增!
有没有办法保持失败的login尝试达到政策? 我担心这可能会被用作DOS攻击。
Zimbra是电子邮件和协作套装。 它使用postfix作为MTA。 您可以select启用policyd来提供限制function,如配额或限制。
每个configuration都可以通过Web界面或CLI进行更改。 直接编辑configuration文件/数据库不应该完成。 Zimbra在升级或重新启动时可能会覆盖它。
根据这个页面 ,我们可以通过只执行两个命令行来启用policyd。
在后台,zimbra会改变后缀configuration。 这里启用了policyd之前和之后的postconf -n输出。
smtpd_client_restrictions = reject_unauth_pipelining smtpd_data_restrictions = reject_unauth_pipelining smtpd_end_of_data_restrictions = smtpd_etrn_restrictions = smtpd_helo_restrictions = smtpd_recipient_restrictions = yreject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unlisted_recipient, reject_invalid_helo_hostname, reject_non_fqdn_sender, permit smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination smtpd_restriction_classes = smtpd_sender_restrictions =
后
smtpd_client_restrictions = reject_unauth_pipelining smtpd_data_restrictions = reject_unauth_pipelining smtpd_end_of_data_restrictions = check_policy_services 127.0.0.1:10031 smtpd_etrn_restrictions = smtpd_helo_restrictions = smtpd_recipient_restrictions = check_policy_services 127.0.0.1:10031, reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unlisted_recipient, reject_invalid_helo_hostname, reject_non_fqdn_sender, permit smtpd_relay_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination smtpd_restriction_classes = smtpd_sender_restrictions = check_policy_services 127.0.0.1:10031
分析postconf -n的输出postconf -n可以解释zimbra中发生的行为。 在smtpd_sender_restrictions阶段,zimbra已经联系了policyd(通过check_policy_services)。 在那个阶段, 柜台已经在增加了 。 在smtpd_relay_restrictions阶段,postfix通过发出错误消息“授权失败”来拒绝电子邮件。
根据上面的分析,可以通过删除smtpd_sender_restrictions中的check_policy_services来阻止该行为。 Postfix仍然调用smptd_recipient_restrictions中的check_policy_services。
免责声明: