Postfix – Host or domain name not found

After installing Postfix on my new Ubuntu server and try sending an email with:

echo "Hello there" | sendmail myname@company.com

There is no new mail both in my Inbox or Spam. A quick check on the log file.

cat /var/log/mail.log

I got (Host or domain name not found. Name service error for name=company.com type=MX: Host not found, try again).

If this happened you can:

cp /etc/resolv.con /etc/spool/postfix/etc
/etc/init.d/postfix restart

Have fun!


Leave a comment