邮箱搭建常见错误

通过客户端发送邮件遇到的错误,解决方案一些经验

错误504 5.5.2

错误信息:Please check the email <[email protected]>, server reply: 504 5.5.2 <DESKTOP-8NP2UMV>: Helo command rejected: need fully-qualified hostname

错误原因:

邮件发送客户端的helo 信息不是完全的FQDN名称,一般邮件客户端都是使用主机名发送

给服务器,我们一般电脑上都不会设置成fqdn的形式

解决方法:修该postfix配置文件/etc/postfix/main.cf

找到helo认证信息 smtpd_helo_restrictions 注释掉下面的一行

reject_non_fqdn_helo_hostname

错误450 4.7.1

错误信息:Please check the email <[email protected]>, server reply: 450 4.7.1 <DESKTOP-8NP2UMV>: Helo command rejected: Host not found

原因和上一个错误大同小异,如果你的主机是fqnd名称了但是反向PTR无法解析的话就是

这个错误,客户端发送help信息时候,服务器会通过客户端的Ip信息进行反向查看,如无法匹配

报这个错误,这个两个设定绝大部门用于内部邮件

解决方案

修该postfix配置文件/etc/postfix/main.cf

找到helo认证信息 smtpd_helo_restrictions 注释掉下面的一行

reject_unknown_helo_hostname

如下两个错误的解决办法一样554 5.7.1,454 4.7.1

错误信息:554 5.7.1 <[email protected]>: Recipient address rejected: SMTP AUTH is required, or it is a spam with forged sender domain

如果但解决这个错误,可以把以下policy检查取消即可,这时候发往内部邮件无问题,

外部邮件会有下面的报错

check_policy_service inet:127.0.0.1:7777

 
 

错误信息:454 4.7.1 <[email protected]>: Relay access denied

问题原因,通过查看日志发现,我们发送邮件是匿名的,在配置文件中启用外发邮件必须认证即可

Dec 17 11:01:58 www postfix/smtpd[1740]: disconnect from unknown[101.64.179.207]

Dec 17 11:02:11 www postfix/postscreen[1739]: CONNECT from [101.64.179.207]:10466 to [103.79.76.193]:25

Dec 17 11:02:11 www postfix/postscreen[1739]: PASS OLD [101.64.179.207]:10466

Dec 17 11:02:11 www postfix/smtpd[1740]: connect from unknown[101.64.179.207]

Dec 17 11:02:12 www postfix/smtpd[1740]: Anonymous TLS connection established from unknown[101.64.179.207]: TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)

Dec 17 11:02:12 www postfix/smtpd[1740]: NOQUEUE: reject: RCPT from unknown[101.64.179.207]: 454 4.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> pr

oto=ESMTP helo=<DESKTOP-8NP2UMV>

 
 

在配置文件/etc/postfix/main.cf 添加如下几行

注意如没有相关选项,添加即可

 
 

smtpd_sasl_auth_enable = yes #使用SMTP认证

broken_sasl_auth_clients = yes #让不支持RFC2554的smtpclient也可以跟postfix做交互

smtpd_sasl_local_domain = $myhostname #需要认证的域,

smtpd_sasl_security_options = noanonymous //不允许指定域进行匿名发送邮件

猜你喜欢

转载自www.cnblogs.com/navysummer/p/12672657.html