码迷,mamicode.com
首页 > 其他好文 > 详细

解决iredmail下postfix发送邮件时报错[need fully-qualified hostname]

时间:2014-10-24 14:25:15      阅读:1355      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   io   os   ar   sp   文件   div   

iredmail配置好后,尝试从一客户端的OE中发送邮件,结果报错,在mail主机中查看tail /var/log/maillog,发现如下错误信息:
Oct 24 12:50:49 mail2 postfix/smtpd[9280]: connect from unknown[192.168.5.240]
Oct 24 12:50:49 mail2 postfix/smtpd[9280]: NOQUEUE: reject: RCPT from unknown[192.168.5.240]: 504 5.5.2 <dzDevelop>: Helo command rejected: need fully-qualified hostname; from=<lon@mail2.yinghuan.com> to=<lon@mail2.yinghuan.com> proto=ESMTP helo=<dzDevelop>
Oct 24 12:50:49 mail2 postfix/smtpd[9280]: NOQUEUE: reject: RCPT from unknown[192.168.5.240]: 504 5.5.2 <dzDevelop>: Helo command rejected: need fully-qualified hostname; from=<lon@mail2.yinghuan.com> to=<gng@yinghun.com> proto=ESMTP helo=<dzDevelop>
Oct 24 12:50:49 mail2 postfix/smtpd[9280]: disconnect from unknown[192.168.5.240]
Oct 24 12:52:11 mail2 postfix/smtpd[9280]: connect from unknown[192.168.5.240]
Oct 24 12:52:11 mail2 postfix/smtpd[9280]: NOQUEUE: reject: RCPT from unknown[192.168.5.240]: 504 5.5.2 <dzDevelop>: Helo command rejected: need fully-qualified hostname; from=<lon@mail2.yinghuan.com> to=<lon@mail2.yinghuan.com> proto=ESMTP helo=<dzDevelop>
Oct 24 12:52:11 mail2 postfix/smtpd[9280]: NOQUEUE: reject: RCPT from unknown[192.168.5.240]: 504 5.5.2 <dzDevelop>: Helo command rejected: need fully-qualified hostname; from=<lon@mail2.yinghuan.com> to=<gng@yinghun.com> proto=ESMTP helo=<dzDevelop>

经过努力探索,发现只需要修改postfix的配置文件即可,我的版本postfix配置文件位于/etc/postfix/main.cf

用编辑器打开vim /etc/postfix/main.cf,找到smtpd_helo_restrictions这一行,按照下面修改后保存。

smtp_data_xfer_timeout = 600s
smtpd_helo_required = yes
#smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_helo_hostname, reject_invalid_helo_hostname, check_helo_access pcre:/etc/postfix/helo_access.pcre
#上面一行修改下面的内容,去掉reject_non_fqdn_helo_hostname
smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated,  reject_invalid_helo_hostname, check_helo_access pcre:/etc/postfix/helo_access.pcre

 重新启动postfix

service postfix restart

再次发送,ok了

解决iredmail下postfix发送邮件时报错[need fully-qualified hostname]

标签:style   blog   color   io   os   ar   sp   文件   div   

原文地址:http://www.cnblogs.com/dajianshi/p/4048066.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!