postfix測試時常遇到的問題之解決辦法

上面這種錯誤在postfix日誌中也能夠看到post

[root@mail ~]# tail -f /var/log/maillog
Jul 13 13:51:26 mail postfix/smtp[20180]: 6CFE88D702: to=<2232855560@qq.com>, relay=mx3.qq.com[184.105.206.31]:25, delay=3.4, delays=0.85/0.01/0.9/1.6, dsn=2.0.0, status=sent (250 Ok: queued as )
Jul 13 13:51:26 mail postfix/qmgr[20140]: 6CFE88D702: removed
Jul 13 13:53:38 mail postfix/postfix-script[21342]: stopping the Postfix mail system
Jul 13 13:53:38 mail postfix/master[20138]: terminating on signal 15
Jul 13 13:53:39 mail postfix/postfix-script[21421]: starting the Postfix mail system
Jul 13 13:53:39 mail postfix/master[21423]: daemon started -- version 2.10.1, configuration /etc/postfix
Jul 13 13:53:55 mail postfix/smtpd[21546]: warning: hostname 213.56.4.122.broad.jn.sd.dynamic.163data.com.cn does not resolve to address 122.4.56.213: Name or service not known
Jul 13 13:53:55 mail postfix/smtpd[21546]: connect from unknown[122.4.56.213]
Jul 13 13:53:55 mail postfix/smtpd[21546]: NOQUEUE: reject: RCPT from unknown[122.4.56.213]: 454 4.7.1 <2232855560@qq.com>: Relay access denied; from=<ilanni@jnjsj.ml> to=<2232855560@qq.com> proto=ESMTP helo=<DESKTOP-SC12IS7>
Jul 13 13:53:55 mail postfix/smtpd[21546]: disconnect from unknown[122.4.56.213]

分析解決:實際上此錯誤是由於postfix 配置文件main.cf文件中的spa

mynetworks = 0.0.0.0/0
沒有設置對,有多是前面有#號沒有打開,也有多是設置了別的參數。3d

上面設置後再重啓postfix systemctl  restart postfix後,再發郵件就成功了。rest

不過這種設置有很大的隱患日誌

聽說下面這樣設置code

$mynetworks = 127.0.0.0/8, 127.0.0.1
smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated,

會好些,但我試了一下,不行呢blog

相關文章
相關標籤/搜索