LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 04-14-2010, 11:07 AM   #1
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Rep: Reputation: 15
postfix relay error Host or domain name not found.


i am trying to get postfix to relay through my isp's smtp server, but i am getting an error.

Quote:
Host or domain name not found. Name service error for name=mail.grandecom.net type=A: Host not found, try again
i can send mail inside my domain, but when i try to send an email to a test gmail address i find the above error in the log.

this server is running centos 5.4 with dovecot and postfix installed

networking and postconf -n
http://pastebin.com/Ap0eZA8E

Last edited by zeos386sx; 04-14-2010 at 11:52 AM.
 
Old 04-14-2010, 12:45 PM   #2
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
mail.grandecom.net does not exist.

EDIT: Oops, I ran dig again and it does exist, however, there is no MX record.

Try relaying mail through their SMTP Server, which appears to be

mxin.grandecom.net.

EDIT: You might try mx1.lsn.net as well, that is one of the servers mail.grandecom.net points to.

This MAY not work if they have that server configured for incoming only. But it is where to start.

To find this type of information you need to open a terminal window and type
Code:
dig <domain> mx
where <domain> is the domain you are looking for the Mail server of.

I didn't' look at your config files, because I think all the info needed was in the error.

Hope this helps.

Last edited by never say never; 04-14-2010 at 12:54 PM. Reason: changed results.
 
Old 04-14-2010, 12:52 PM   #3
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
mail.grandecom.net is the address grande say is their smtp server and i can ping it and telnet into it.

here is the output of dig mail.grandecom.net MX and dig mxin.grandecom.net MX

Quote:
[root@cent ~]# dig mail.grandecom.net MX

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mail.grandecom.net MX
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 49563
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.grandecom.net. IN MX

;; AUTHORITY SECTION:
grandecom.net. 600 IN SOA ns1.lsn.net. root.lsn.net. 2010041302 10800 3600 604800 600

;; Query time: 27 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Apr 14 12:48:47 2010
;; MSG SIZE rcvd: 85

[root@cent ~]# dig mxin.grandecom.net MX

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mxin.grandecom.net MX
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 50664
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mxin.grandecom.net. IN MX

;; AUTHORITY SECTION:
grandecom.net. 600 IN SOA ns1.lsn.net. root.lsn.net. 2010041302 10800 3600 604800 600

;; Query time: 32 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Wed Apr 14 12:49:26 2010
;; MSG SIZE rcvd: 85
edit: same error with relayhost = [mxin.grandecom.net]:25 set

Last edited by zeos386sx; 04-14-2010 at 03:16 PM.
 
Old 04-14-2010, 03:40 PM   #4
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Did you telnet to it from the same machine running Postfix?

Did you use the IP or hostname?

What is the configuration of your network? (Nat, direct to Inet, firewall, router . . .)

Did you try
Code:
relayhost = mail.grandecom.net:25
Without the []? (would be odd since there are no MX records)

Might try
Code:
relayhost = grandecom.net:25
as well. That would allow postfix to fine mxin.grandecom.net

If the above fails, I would still be tempted to the mx1.lsn.net, since that is where it points anyway.
 
Old 04-14-2010, 05:03 PM   #5
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by never say never View Post
Did you telnet to it from the same machine running Postfix?
yes

Quote:
Originally Posted by never say never View Post
Did you use the IP or hostname?
hostname

Quote:
Originally Posted by never say never View Post
What is the configuration of your network? (Nat, direct to Inet, firewall, router . . .)
nat

Quote:
Originally Posted by never say never View Post
Did you try
Code:
relayhost = mail.grandecom.net:25
Without the []? (would be odd since there are no MX records)

Might try
Code:
relayhost = grandecom.net:25
as well. That would allow postfix to fine mxin.grandecom.net

If the above fails, I would still be tempted to the mx1.lsn.net, since that is where it points anyway.
no i haven't tried that, i will give it a shot.

edit: getting "Host or domain name not found. Name service error for name=mail.grandecom.net type=MX: Host not found, try again" with relayhost = mail.grandecom.net:25
same with the other hostnames

Last edited by zeos386sx; 04-14-2010 at 05:14 PM.
 
Old 04-14-2010, 05:20 PM   #6
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
this may have something to do with it

Quote:
Can I relay through Grande's mail server from my friends house or my office?
Yes, however you will need to CHECK your mail first. After a successful mail check, the IP address of the remote location that you are coming from will be permitted to send mail for a period of 30 minutes. Each new successful POP3 check will extend your permitted relay period for a new 30 minutes.
 
Old 04-15-2010, 09:52 AM   #7
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Well I suppose that is possible, but then you shouldn't be able to telnet in and send a message from that machine. Even then the error says it can't find the domain. That smacks of a DNS issue. What happens if you enter the IP address instead of the hostname.

You are restarting postfix after each change right? I don't think I explicitly said to restart postfix but you muse do that after editing the config files.

Try it with the IP Address of 66.90.130.73. If that works it is a DNS issue. If that fails, then the problem is either in postfix or your NAT Router, or possibly that your ISP is blocking SMTP traffic, though I would expect different errors if that were the case.
 
Old 04-15-2010, 05:39 PM   #8
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
yes i restart postfix each time.

going by ip seems to have worked, recieved the message at my gmail account. although the address shows up @xxxxxx.dyndns.org rather than to actual domain, i think i must have misunderstood the purpose the cname thing.

Quote:
[root@cent ~]# dig mail.gandacomputers.com mx

; <<>> DiG 9.3.6-P1-RedHat-9.3.6-4.P1.el5_4.2 <<>> mail.gandacomputers.com mx
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 57366
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;mail.gandacomputers.com. IN MX

;; ANSWER SECTION:
mail.gandacomputers.com. 600 IN CNAME gandawaco.dyndns.org.

;; AUTHORITY SECTION:
dyndns.org. 600 IN SOA ns1.dyndns.org. hostmaster.dyndns.org. 1275078674 600 300 604800 600

;; Query time: 25 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Thu Apr 15 17:54:31 2010
;; MSG SIZE rcvd: 126

Last edited by zeos386sx; 04-15-2010 at 05:55 PM.
 
Old 04-16-2010, 08:14 AM   #9
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
So you still have 3 issues as I see it.

1. Your Postfix can not resolve hostnames.

You can live with this as long as you are sending all your mail through your ISP's server. However, it would be something I would want to resolve because:
a. Your ISP's SMTP Server address could change
b. Postfix should be able to resolve hostnames.

Afraid I am not sure where to start on this one, perhaps a strace or tcpdump could help find the problem.

2. "the address shows up @xxxxxx.dyndns.org"

This one is really only a problem if it is showing up in the 'From' address that way. If it is you need to set postfix and / or your mail client to use your actual domain name.

3. Technically SMTP servers should NOT be set up as a CNAME, but should always point to an 'A' record.

So you should set your MX record to point to 'gandawaco.dyndns.org' (an 'A' record) rather than to 'mail.gandacomputers.com' (a 'CNAME')

Hope this helps.
 
Old 04-16-2010, 09:46 AM   #10
zeos386sx
LQ Newbie
 
Registered: Oct 2004
Location: waco, tx
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by never say never View Post
2. "the address shows up @xxxxxx.dyndns.org"

This one is really only a problem if it is showing up in the 'From' address that way. If it is you need to set postfix and / or your mail client to use your actual domain name.
i thought i had set that with myorigin or mydomain in main.cf.
 
Old 04-17-2010, 03:20 PM   #11
never say never
Member
 
Registered: Sep 2009
Location: Indiana, USA
Distribution: SLES, SLED, OpenSuse, CentOS, ubuntu 10.10, OpenBSD, FreeBSD
Posts: 195

Rep: Reputation: 37
Might need to see the headers from a test e-mail here. I wonder if gmail is displaying it differently due to the CNAME.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix - Single domain with multipe relay host jignesh.vasani Linux - Software 10 11-30-2009 04:53 PM
Postfix with smtp not working "Host or domain name not found." targettl Linux - Networking 2 09-16-2009 02:40 PM
Postfix+Dovecot error : RELAY ACCESS DENIED when send mail out to Other domain simon.unix Linux - Networking 6 09-16-2009 10:54 AM
Postfix allow relay to a mail host within lan Niceman2005 Linux - Software 2 06-20-2007 01:43 AM
postfix and relay host mozilla Linux - Networking 1 11-23-2005 08:42 PM


All times are GMT -5. The time now is 11:47 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration