Operating System - HP-UX
1833784 Members
3736 Online
110063 Solutions
New Discussion

sendmail , host not found

 
SOLVED
Go to solution
steven Burgess_2
Honored Contributor

sendmail , host not found

Hi Everyone

I know I should be reading the sendmail bible but I need a couple of pointers

Can anyone tell me where the mail server is defined when sending mail via specific address

ie

user@xexche01
user@dominname.com

I am currently getting host unknown when attempting to send via .com but ok when using xexche01

Can anyone advise the procedure to resolving this

Thanks in advance

Steve
take your time and think things through
7 REPLIES 7
Massimo Bianchi
Honored Contributor

Re: sendmail , host not found

Hello,
as far as i know you sholud set correctly the DS entry in the profile, and you must have a DNS properly configured to revolv all the domain you desire.
Do not forget the resolv.conf, sendmail depends heavily on this file and on its existance.

Or you were asking for a more deep-in solution ?

HTH,
Massimo
Uday_S_Ankolekar
Honored Contributor

Re: sendmail , host not found

If server is configured for DNS then
look into nsswitch.conf file

is DNS mentioned anywhere for hosts if not add it and then try sending with domain

-USA..

Good Luck..
Steven E. Protter
Exalted Contributor
Solution

Re: sendmail , host not found

A few choices.

If you have direct access to the internet...

modify the hosts line of /etc/nssswitch.conf

put dns ahead of files

modify /etc/resolv.conf to point to a working possibly public DNS server.

test it.

nslookup yahoo.com

sendmail -v -d8.99 -d38.99 steve@domain.com

type a line of text anythign you want
.

You will either resolve or get good diagnostics as to why not.

Or.

Use a relay server.

HAve the relay server open up for relay from your IP address.

modify sendmail.cf

DS
[IP of relay server]

save the file

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

re-run the above sendmail test.

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
Christopher Caldwell
Honored Contributor

Re: sendmail , host not found

Stock sendmail will generally do the right thing (tm) if DNS is set up correctly.

By default, there's deep hooks into DNS [if you don't override the default mail routing using something like smart host]. If you can look the domain up on the command line

$nslookup domain.com
or
nslookup
>set type=mx
>domain.com.

Then the right thing should happen. If you can't look up a name, you need to make sure nsswitch.conf is set up correctly; you have to point the resolver to a name server that can look up the name, or you have to relay all the mail to another server that can look up the name.

From a design perspective, IMHO, any server that runs sendmail to deliver mail directly to the Internet should run DNS as well. It's a trivial set up, and things will work much better if you use DNS.

In the old days, when we had to be conservative with memory, most designers would run DNS on a small number of hosts.

Today, the boxes are much beefier; memory is much cheaper.
steven Burgess_2
Honored Contributor

Re: sendmail , host not found

Hi all

Thanks for the replies. The domainname.com is actually my own domain

I have this working on one server where I have

Dj$w.mbnainternational.com

and

# "Smart" relay host (may be null)
DS

Should I not expect to see an ip address defined to DS so that all mails are passed to the relay server ?

Thanks again

Steve
take your time and think things through
Christopher Caldwell
Honored Contributor

Re: sendmail , host not found

You didn't let us know the results of
nslookup
> set type=mx
> domainname.com.

If that doesn't work, your choices are point sendmail at a smart relay or make the lookup work by configuring DNS or pointing the resolver at a DNS that works.

I'd imagine that the relay could be set to an IP or a host [as long as the host looks up in DNS].
Steven E. Protter
Exalted Contributor

Re: sendmail , host not found

Change this

Dj$w.mbnainternational.com

To

Djmbnainternational.com

Now it will be able to send mail to aol/yahoo et al.

restart sendmail

Or make the machine's hostname fully qualified.

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