当前位置: 技术问答>linux和unix
postfix,邮件发送时出现NAME SERVICE ERROR错误,为何?
来源: 互联网 发布时间:2015-01-30
本文导语: postfix,邮件发送时出现NAME SERVICE ERROR错误,为何?我的邮件服务器是通过设置网关连接到网络的.而且可以PING到外面的主机. | Postfix - Name service error for xxx.com: Host not found, try again If you ge...
postfix,邮件发送时出现NAME SERVICE ERROR错误,为何?我的邮件服务器是通过设置网关连接到网络的.而且可以PING到外面的主机.
|
Postfix - Name service error for xxx.com: Host not found, try again
If you get this error in /var/log/mail/info it might be because your /var/spool/postfix/etc/resolv.conf is wrong. If you look in /var/log/mail/warnings and sees
warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
you should copy /etc/resolv.conf to /var/spool/postfix/etc/ .
The error comes because you run postfix as chroot and postfix can then only see files in /var/spool/postfix/ . During install postfix takes a copy of /etc/resolv.conf and place it in its own directory.
There could be more errors than that. Check /var/log/mail/warnings and /var/log/mail/errors and make sure you have verified all files. In case of more trouble run the command postfix check.
You could also get error messages like:
postfix/postfix-script: warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
postfix/postfix-script: warning: /var/spool/postfix/etc/services and /etc/services differ
Which implies that /etc/localtime and /etc/services should be copied. Before doing anything check what the difference of the files is.
For more information: http://www.postfix.org/faq.html#numerical_log Postfix logs SMTP clients as IP addresses
If you get this error in /var/log/mail/info it might be because your /var/spool/postfix/etc/resolv.conf is wrong. If you look in /var/log/mail/warnings and sees
warning: /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf differ
you should copy /etc/resolv.conf to /var/spool/postfix/etc/ .
The error comes because you run postfix as chroot and postfix can then only see files in /var/spool/postfix/ . During install postfix takes a copy of /etc/resolv.conf and place it in its own directory.
There could be more errors than that. Check /var/log/mail/warnings and /var/log/mail/errors and make sure you have verified all files. In case of more trouble run the command postfix check.
You could also get error messages like:
postfix/postfix-script: warning: /var/spool/postfix/etc/localtime and /etc/localtime differ
postfix/postfix-script: warning: /var/spool/postfix/etc/services and /etc/services differ
Which implies that /etc/localtime and /etc/services should be copied. Before doing anything check what the difference of the files is.
For more information: http://www.postfix.org/faq.html#numerical_log Postfix logs SMTP clients as IP addresses