1835243 Members
2329 Online
110078 Solutions
New Discussion

Mail troubles

 
Johan Barelds
Frequent Advisor

Mail troubles

Hi all,

I do experience some trouble with sending emails. I do have a server configured so send mail via sendmail=>smart relay. The smart relay is the business mailserver. The server who needs to send mail is in the safe area of the network. Every now and then i get an error when sending mail:
--------
----- The following addresses had transient non-fatal errors -----


----- Transcript of session follows -----
451 poortvliet.nu: Name server timeout
Warning: message still undelivered after 4 hours
Will keep trying until message is 5 days old
---------
My server is resolving via 2 DNS servers, but probably it does experience problems every now and then.

Anyone any ideas about cause/solution etc.etc.?

Thanks in advance goeroes!

Grz. Johan
Make my day..:-)
12 REPLIES 12
Brian Bergstrand
Honored Contributor

Re: Mail troubles

The cause is right there in the message. "Name server timeout". Either sendmail timed out resolving "poortvliet.nu" or it timed out looking up the MX record for that domain.

The solution is too make the domain servers for poortvliet.nu more reliable. Do you control those?

HTH.
Johan Barelds
Frequent Advisor

Re: Mail troubles

Nope, i don't control them. They are outside the business network somewhere.

But do i hear you saying that is not being caused by or own DNS's? It is definitly the DNS which actualy keeps the poortvliet.nu domain? (in this case somewhere outside the company on the internet)

In other words: it is not something i should be responsible for because i am the system admin from our company...:-)

Grz. Johan
Make my day..:-)
Brian Bergstrand
Honored Contributor

Re: Mail troubles

That was a guess. It's probably the most likely cause, but the problem could technically be anywhere in the resolve chain. Even with the root servers (although it is VERY unlikley all 13 are down).

During these "outages" are you able to resolve other names? If so, then the problem is not with your servers and lies outside your control.

HTH.

Uday_S_Ankolekar
Honored Contributor

Re: Mail troubles

Run sendmail -q at regular interval probably with a cronjob, this will push all the mails they are in queue.
There may be some networking or communication issue with the mail server and DNS server, hence these errors.

-USA..
Good Luck..
Steven E. Protter
Exalted Contributor

Re: Mail troubles

There are definitely network/dns communication issues. You also want to make sure your ISP connection isn't dropping because ultimately DNS resolution is coming from the publid internet.

Diagnostic tools:
1) In a telnet/ssh window tail -f /var/adm/syslog/mail.log lets you see the mail transfer interactively
2) mailq lets you know if messages are backed up.
3) as noted sendmail -q tries to push the queue out, won't help if there are issues keeping the mail queued.
4)sendmail -v -d8.99 -d38.99 someaddress@net.com
type a line of text

.

gets you verbose diagnostics.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Johan Barelds
Frequent Advisor

Re: Mail troubles

Hi all!

Thanks for all the replies so far!

1. mailq let me show 4 messages queued (as i expected)
2. sendmail -q didn't pushed them out
3. "sendmail -v -d8.99 -f38.99 transport@poortvliet.nu" gives me the following result:
-----< CUT >-------
dns_getcanonname(poortvliet.nu, trymx=1)
dns_getcanonname: trying poortvliet.nu. (ANY)
YES
dns_getcanonname: trying poortvliet.nu. (A)
NO: errno=238, h_errno=2
poortvliet.nu: Name server timeout
transport@poortvliet.nu... Transient parse error -- message queued for future delivery
hallo
.
transport@poortvliet.nu... queued
-----< CUT >-------

Any clues what errno=238 and/or h_errno=2 could mean?

Thank again...
Make my day..:-)
Steven E. Protter
Exalted Contributor

Re: Mail troubles

You again got a DNS server timeout with that 238.

Since it could not resolve the hostname, it queued up the message for future delivery.

Try this:
nslookup poortvliet.nu

if you have it.
dig poortvliet.nu

You should get instant results. If not, you've got to check the servers in /etc/resolv.conf and make sure they are valid and they return valid name resolution.

If also appears that sendmail is not using mail relay. This could be the problem as well.

check sendmail.cf
DS
[ip_address_of_relay_sever]

save the file

/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Try the diagnostic again.

Why the IP address? Becuase clearly you have a name resolution problem and if you use the DShostname solution and the hostname doesn't resolve, that could be the entire problem.

Try this stuff, re-test the diagnostic, check mailq, see if sendmail -q helps push mail off the server and get back to the thread with data.

Please consider point assignment if this has been helpful or solves the problem.

You can beat this, its just a matter of time.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Johan Barelds
Frequent Advisor

Re: Mail troubles

Hi Steven,

1. nslookup poortvliet.nu:
---------------
#nslookup poortvliet.nu
Using /etc/hosts on: untrsp03

looking up FILES
Trying DNS
*** blwmails.thegreenery.com can't find poortvliet.nu: Non-existent domain
---------------

2. /etc/resolv.conf
---------------
domain thegreenery.com
nameserver 194.151.18.67 # blwmails
nameserver 172.16.136.50 # brdmails
------------------
#telnet 194.151.18.67 53
Trying...
Connected to 194.151.18.67.
Escape character is '^]'.
------------------
#telnet 172.16.136.50 53
Trying...
Connected to 172.16.136.50.
Escape character is '^]'.
------------------

3. mail relay
------------------
#cat sendmail.cf|grep ^DS
DSrelay1.thegreenery.com
------------------
#nslookup relay1.thegreenery.com
Using /etc/hosts on: untrsp03

looking up FILES
Name: relay1.thegreenery.com
Address: 172.16.192.52
------------------
#telnet 172.16.192.52 25
Trying...
Connected to 172.16.192.52.
Escape character is '^]'.
220 mailgateway.thegreenery.com GroupWise Internet Agent 5.5.5 Ready (C)1993, 1998 Novell, I
------------------

Other mail sending -besides one other domain- is just doing fine.
Is my conclusion valid that the problem lies not on my server?

Thanks again!
Grz. Johan
Make my day..:-)
Steven E. Protter
Exalted Contributor

Re: Mail troubles

Your conclusion is quite correct in my opinion.

It could be the DNS server for the target domain. If thats out of your control, there is nothing you can do besides contact the server admin.

The groupwise might need patching to be compatible with a current mailsystem.

If DNS resolution is cool for the DS directive in sendmail, you don't need to futz with that.

It would appear that through diagnosis you probably don't have an issue on this server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Johan Barelds
Frequent Advisor

Re: Mail troubles

Hi Steven,

The strange thing is that every now and then a mail to the problem-domains succeeds.
It started yesterday the caching-only DNS via SAM and that seemed to work for a while.

Strange thing is that it's not working at this moment as i would expect that resolving can be done via the the local caching-only DNS because it found the domain at least ones before.

Do i need to put something like "nameserver localhost" in the nsswitch.conf in order to use the caching-only DNS?

Thanks again.

Grz. Johan
Make my day..:-)
Brian Bergstrand
Honored Contributor

Re: Mail troubles

If you have a local caching server you can add

"nameserver 127.0.0.1"

to /etc/resolv.conf (before other entries) and the resolver will use that. But in your case, I don't know how much it will help. It sounds like the nameserver for the domain you are trying is up intermittently. When it's up then you are able to resolve. But, in that case, your nameservers should be caching the entry themselves. So either your local nameservers aren't configured properly, or the TTL is set low on the poortvliet domain causing it to expire from the cache. A caching only NS would suffer the same effects.

About the only "permanent" workaround is to add poortvliet.nu to your /etc/hosts file. But, if the IP address ever changes then you will have to manually update. Plus, this won't solve the problem of finding the MX for the domain, which sendmail will still try to do.

Doesn't sound like there is much you can do other than contacting the technical admin for the domain. You can use whois to get this info, or go to www.internic.net.

HTH.
Johan Barelds
Frequent Advisor

Re: Mail troubles

Ok, thanks Brian!

I will do some investigation on our own DNS'es and otherwise setup an alternative linux DNS route.

Thanks for all the help here!

Grz. Johan
Make my day..:-)