首页 > 代码库 > 解决iredmail下postfix发送邮件时报错[need fully-qualified hostname]
解决iredmail下postfix发送邮件时报错[need fully-qualified hostname]
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 = 600ssmtpd_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_hostnamesmtpd_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]
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。