Linode Forum
https://forum.linode.com/

Host or domain name not found. Name service error for name=X
https://forum.linode.com/viewtopic.php?f=11&t=9089
Page 1 of 1

Author:  rosst400 [ Tue Jul 03, 2012 3:07 am ]
Post subject:  Host or domain name not found. Name service error for name=X

Hi,

I am new to the world of Linux and I am attempting to setup email on my Linode, so I can generate and send email from my PHP scripts.


I have decided to use Postfix, but I cannot send email externally. I checked the mail.log file and the following logs are appearing. I have substituted "myhost", "mydomainname" and my email address.

Jul 3 16:32:22 myhost postfix/pickup[11183]: 32D332A9AA: uid=0 from=<root>
Jul 3 16:32:22 myhost postfix/cleanup[12335]: 32D332A9AA: message-id=<20120703063222.32D332A9AA@myhost.mydomainname.com.au>
Jul 3 16:32:22 myhost postfix/qmgr[9647]: 32D332A9AA: from=<root@myhost.mydomainname.com.au>, size=313, nrcpt=1 (queue active)
Jul 3 16:32:22 myhost postfix/smtp[12338]: warning: relayhost configuration problem
Jul 3 16:32:22 myhost postfix/smtp[12338]: 32D332A9AA: to=<my.name@gmail.com>, relay=none, delay=30, delays=30/0.02/0.01/0, dsn=4.3.5, status=deferred (Host or domain name not found. Name service error for name=smtp.mydomainname.com.au type=A: Host not found)

I ran the command
Code:
dig smtp.mydomainname.com.au mx
:

; <<>> DiG 9.7.0-P1 <<>> smtp.mydomainname.com.au mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 21101
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;smtp.mydomainname.com.au. IN MX

;; AUTHORITY SECTION:
mydomainname.com.au. 71568 IN SOA ns1.linode.com. my\.name.gmail.com. 2012060973 14400 14400 1209600 86400

;; Query time: 42 msec
;; SERVER: 74.207.242.5#53(74.207.242.5)
;; WHEN: Tue Jul 3 16:18:26 2012
;; MSG SIZE rcvd: 104

I am note sure what the problem is. Any assistance would be greatly appreciated.

Thanks.

Author:  NeonNero [ Tue Jul 03, 2012 4:08 am ]
Post subject:  Re: Host or domain name not found. Name service error for na

First, MX is set on the domain name itself, and points to the hostname of a server that handles mail for that domain. The hostname referenced needs to be pointed to an A or AAAA record (IPv4 or IPv6, respectively). Like this:
Code:
$ORIGIN example.com.au.
          IN A    10.11.12.13
          IN MX 1 smtp.example.com.au.
www       IN A    10.11.12.13
smtp      IN A    10.11.12.13


But, without the actual domain name to diagnose, I'm taking a guess here.

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/