大网数据广告活动
服务器运维问答

Bypass Postfix 'reject_unknown_client_hostname' for authenticated SMTP clients

· 52CE 我爱测

In my postfix configuration, I've switched on smtpd_client_restrictions = reject_unknown_client_hostname as an anti-spam measure. However, sometimes I fall foul of this myself when I make an authenticated SMTP connection to the s…

问题原文

原帖链接 · tcdaly · CC BY-SA 3.0

In my postfix configuration, I've switched on smtpd_client_restrictions = reject_unknown_client_hostname as an anti-spam measure.

However, sometimes I fall foul of this myself when I make an authenticated SMTP connection to the server from remote hosts that don't have reverse DNS. My attempt to send an email gets rejected.

Is there any way to ignore smtpd_client_restrictions = reject_unknown_client_hostname in the case of an authenticated client?

已采纳解答

原帖链接 · jojoob · CC BY-SA 3.0

To not restrict authenticated clients by the reject_unknown_client_hostname restrictions you can simply place the permit_sasl_authenticated directive before it. See http://www.postfix.org/postconf.5.html#permit_sasl_authenticated

Example:

smtpd_client_restrictions = 
    permit_sasl_authenticated,
    reject_unknown_client_hostname

Maybe you want to also permit "mynetworks".

Tip: in addition you can also use the reject_non_fqdn_helo_hostname and reject_unknown_helo_hostname restriction within the smtpd_helo_restrictions to minimize spam. But same as above, place permit_sasl_authenticated before it to not restrict your authenticated clients.

Example:

smtpd_helo_restrictions =
    permit_sasl_authenticated
    reject_non_fqdn_helo_hostname
    reject_unknown_helo_hostname

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-10-12)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。