Operating System - HP-UX
1847664 Members
3652 Online
110265 Solutions
New Discussion

Re: sendmail SMTP problem

 
SOLVED
Go to solution
Robert Milne
Frequent Advisor

sendmail SMTP problem

Hello all,

I am trying to get our L-class with HP-UX 11i to forward mail to our Exchange mail gateway setup as SMTP. But the messages won't go !

I have read the HP online manuals for this and have edited the etc/mail/sendmail.cf file to specify the host name of the mail gateway:

DSmail.krone.com.au

I can both ping and telnet 25 to this gateway ID OK, there is an entry for it in the hosts file.

I have also put the entry Dj$w.krone.com.au in so our domain can be determined. Stopped and started the sendmail service OK.

When I mailx out messages nothing goes and I get:

258 Tue Nov 20 14:01 root
(host map: lookup (krone.com.au): deferred)
robert.milne@krone.com.au
into the mailq.

On trying to resolve the addresses with sendmail using:
/usr/sbin/sendmail -bv -v -oL10 robert.milne@krone.com.au

I get:
robert.milne@krone.com.au... krone.com.au: Name server timeout
robert.milne@krone.com.au... Transient parse error -- message queued for future
delivery
robert.milne@krone.com.au... deliverable: mailer relay, host mail.krone.com.au,
user robert.milne@krone.com.au

I am not sure what the problem is, just editing the sendmail.cf for the same DS entry and putting the gateway into /etc/hosts works on our DEC Alpha Tru64 box, so I cannot see what is different here, any clues would be greatly appreciated !

Thanks.
Rob.

"For every pleasure there's a tax."
7 REPLIES 7
Michael Tully
Honored Contributor
Steven Sim Kok Leong
Honored Contributor

Re: sendmail SMTP problem

Hi,

Check your /etc/nsswitch.conf.

If you are using /etc/hosts for name resolution, your /etc/nsswitch.conf should contain this line:

hosts: files [NOTFOUND=continue] dns

Hope this helps. Regards.

Steven Sim Kok Leong
Brainbench MVP for Unix Admin
http://www.brainbench.com
Keith Johnson
Valued Contributor
Solution

Re: sendmail SMTP problem

You need to check your /etc/nsswitch.conf file, but I have had problems leaving dns as a resolution option.

If you are using /etc/hosts as your only name resolution, make the hosts line read:

hosts: files [NOTFOUND=continue]

Also, if you have an /etc/resolv.conf file, move it elsewhere.

KJ
No matter where you go...there you are.
Uday_S_Ankolekar
Honored Contributor

Re: sendmail SMTP problem

Hi,

do a nslookup for the exchange server and check it resolves. Do the same on exchange server and check the result
If you face problem in this then it's a dns issue. Check /etc/nsswitch.conf file check for hosts resoultion method. If you have dns then nsswitch should point DNS, and then files for the hosts entry or else files would come first.
Also check resolve.cnf for domain , search nameserver entries are correct.
Correcting all this restart sendmail by
/sbin/init.d/sendmail stop
/sbin/init.d/sendmail start

Goodluck,
-USA..
Good Luck..
Geoff Wild
Honored Contributor

Re: sendmail SMTP problem

Robert,

I don't know your full network topology, but instead of setting DS to:

DSmail.krone.com.au

Just set it to the "real" name of your exchange server:

DSserver

You shouldn't need the FQDN if your DNS is working.

Make sure to stop/start sendmail.

Rgds...Geoff

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Kevin Wright
Honored Contributor

Re: sendmail SMTP problem

As mentioned above, try nslookup on your exchange servers hostname. Are you even using dns? If not, you could have some trouble setting up mail. Have you set the service switch line in sendmail.cf? Set it to files before dns.
Robert Milne
Frequent Advisor

Re: sendmail SMTP problem

Thanks all,

The existence (or rather lack of) of the nsswitch.conf with the entry hosts: files [NOTFOUND=continue] solved the problem. We aren't using DNS for our main servers for name lookup, just the files. As other services didn't require the nsswitch file to function I just assumed sendmail didn't either. Obviously it's a quirk, feature, setting or otherwise that HP's sendmail variant defaults to DNS lookup first, (via a switch setting alluded to by the last response ?).

Anyway thanks for your help and I gave all of the nsswitch file responders 10 !

PS this forum is excellent !

Rob.

"For every pleasure there's a tax."