Postfix - Name service error for 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: Postfix logs SMTP clients as IP addresses .

by Hans Schou & Ole Tange

ISO/IEC 15445:2000