Postfix rejection_rbl_client黑名单不起作用

Postfix rejection_rbl_client黑名单不起作用

我有一个使用 Postfix 的邮件服务器 (iRedMail)。我收到了很多垃圾邮件,因此我修改了 /etc/postfix/main.cf 文件并将 smtpd_recipient_restrictions 设置为:

smtpd_recipient_restrictions =
        reject_rbl_client zen.spamhaus.org,
        reject_rbl_client bl.spamcop.net,
        reject_rbl_client cbl.abuseat.org,
        reject_rbl_client b.barracudacentral.org,
        reject_invalid_hostname,
        reject_unknown_sender_domain,
        reject_unknown_recipient_domain,
        check_policy_service inet:127.0.0.1:7777,
        check_policy_service inet:127.0.0.1:10031,
        reject_non_fqdn_sender,
        reject_non_fqdn_hostname,
        reject_non_fqdn_recipient,
        reject_unlisted_recipient,
        permit_mynetworks,
        permit_sasl_authenticated,
        reject_unauth_destination,
        permit

然而,垃圾邮件仍然从这些黑名单上的 IP 发来。

如果我查看 /var/log/mail.log 文件,我会看到收到的消息。以下是其中一个例子:

Jan 11 01:09:19 mailhost postfix/smtpd[935]: DA5736B578: client=localhost[127.0.0.1]
Jan 11 01:09:19 mailhost postfix/cleanup[922]: DA5736B578: message-id=<ObreptitiousSoundness_300b221f33a2b213a8dc0ee683baadacnick@mydomain.com>
Jan 11 01:09:19 mailhost postfix/qmgr[31818]: DA5736B578: from=<[email protected]>, size=6081, nrcpt=1 (queue active)
Jan 11 01:09:19 mailhost postfix/smtpd[935]: disconnect from localhost[127.0.0.1]
Jan 11 01:09:19 mailhost amavis[737]: (00737-01) Passed CLEAN, LOCAL [89.185.243.3] [89.185.243.3] <[email protected]> -> <[email protected]>, Message-ID: <ObreptitiousSoundness_300b221f33a2b213a8dc0ee683baadacnick@mydomain.com>, mail_id: NBO0lwDs11eq, Hits: -1.097, size: 5620, queued_as: DA5736B578, 647 ms
Jan 11 01:09:19 mailhost postfix/smtp[930]: D662C6B575: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.1, delays=1.5/0.01/0.02/0.65, dsn=2.0.0, status=sent (250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DA5736B578)

当我在 MXToolBox 上查找 89.185.243.3 时,它列在 Spamhaus Zen 上。

我的配置是否不正确?我注意到,项目的顺序显然会产生影响。

谢谢!

答案1

您的配置不是最佳的,最好在客户端限制中使用 RBL。这是我的建议,尽管有些限制有点多,而且我不知道您的 Postfix 的完整设置。这是一个示例,有关参数的更多信息,请参阅 Postfix 手册和建议……


smtpd_helo_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_pipelining,
    reject_non_fqdn_hostname

smtpd_client_restrictions =
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unauth_destination,
    reject_rbl_client zen.spamhaus.org,
    reject_rbl_client bl.spamcop.net,
    reject_rbl_client cbl.abuseat.org,
    reject_rbl_client b.barracudacentral.org

smtpd_sender_restrictions =
    reject_non_fqdn_sender,
    reject_unknown_sender_domain,
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_authenticated_sender_login_mismatch,
    reject_sender_login_mismatch

smtpd_recipient_restrictions =
    reject_unknown_recipient_domain,
    check_policy_service inet:127.0.0.1:7777,
    check_policy_service inet:127.0.0.1:10031,
    reject_non_fqdn_recipient,
    reject_unlisted_recipient,
    permit

相关内容