Operating System - HP-UX
1820483 Members
2669 Online
109624 Solutions
New Discussion юеВ

sendmail - relay Host unknown since adding dns.

 
George_Dodds
Honored Contributor

sendmail - relay Host unknown since adding dns.

Since adding dns to my hpux 11i box sendmail no longer works.

In the log i receive

mailer=relay, relay=*.*.24.40, stat=Host unknown

I've added the mail relay into /etc/hosts and changed the lookup order to file then dns in nsswitch.conf.

i've also changed the /etc/mail/service.switch file to hosts then dns with no luck.

How can i stop sendmail from using dns

Any ideas?

Ta

George

16 REPLIES 16
T G Manikandan
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

I would check

1.The machine entry is made on the DNS server
2.check the sendmail.cf file for


DS
Dj$w

If the changes were not done there change them and restart sendmail
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

The mail relay server has no entry on the dns server which i dont have access to.

I want sendmail to bypass dns as it used to work fine without it.

DNS setting on unix box are fine.
T G Manikandan
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

If the relay host does not have entry in the DNS then how will sendmail resolve it.

To my understanding earlier you would have the relayhost entry in /etc/hosts and probably the sendmail could resolve it.

Now you are using DNS and it has to have an entry for relayhost to resolve.

Alternatively you can try changing the files option in /etc/nsswitch.conf file to

files dns[unavail=continue][notfound=continue] hosts
T G Manikandan
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

files dns[unavail=continue][notfound=continue] hosts

will make sure to check the hosts file for resolving relayhost if not found on the DNS
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

There was no entry in the hosts file originally i just added it in since this problem started.

If the nsswitch.conf file has
hosts: files [NOTFOUND=continue] dns
surely then sendmail should be able to pick up the entry.

I want sendmail to bypass dns completely
T G Manikandan
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

I read part of your question and replied.
Its fine,
check /var/adm/syslog/mail.log

REvert
Marcel Boogert_1
Trusted Contributor

Re: sendmail - relay Host unknown since adding dns.

Hi there,

Check the file: /etc/mail/sendmail.cw. It should contain the hostname and the fully-qualified hostname for the system.

MB.
T G Manikandan
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

can you do a test

#sendmail -v
TEST
.


Please revert with the output

Thanks
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

# echo test | sendmail -v gdodds@primustel.co.uk
gdodds@primustel.co.uk... Host unknown (Name server: *.*.24.40: host not found)
/dead.letter... Saved message in /dead.letter
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

*.*.24.40 is the ip of the relay server set in sendmail.cf

# "Smart" relay host (may be null)
DS*.*.24.40
Bill Hassell
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

Make sure that your DNS server has an IP and hostname in your /etc/hosts. nslookup will probably return a similar error. It is a common mistake in DNS configs to leave out the DNS server's name. Make sure tha nslookup can find the DNS server by name and by IP address (reverse lookup). sendmail is now critially dependent on name resolution to prevent many types of mail attacks.


Bill Hassell, sysadmin
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

Yup DNS servers are listed in the hosts file.
Geoff Wild
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

I would put the hostnames - not ips, in sendmail.cf

DSrelayserver

That way you know the resolver is working...

I would also set the DM macro:

DMyourdomain.com

Make sure you restart sendmail...

In your /etc/hosts, make sure FQDN is there as well

X.X.24.40 relayserver relayserver.yourdomain.com

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.
Muthukumar_5
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

It seems your host resolvation getting problem.

If your relay hosts are in /etc/hosts file then, use nsswitch.conf file hosts entry and
If you want to use only relay host resolved then,

hosts: files dns
or
hosts: files[notfound=return] dns

-- /etc/hosts ---
IP-Address of Relay hosts relayhost.domain.com relayhost

nsquery hosts "file"
-> will check only on files of /etc/hosts

If you are getting positive results then no problem will come on resolvation during mail

If you are going to resolve with dns then,

hosts: dns files

-- /etc/resolv.conf
domain domainame.com
nameserver
nameserver

You can check resolvation as,

nslookup


Regards
Muthu










Easy to suggest when don't know about the problem!
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

Cracked it

the relay server ip addy was a vitual ip and had no entry in dns, so i tried the actual ip of one of the relay servers but encountered reverse lookup problems.

So i put the actual name of one of the relay server and hey presto it worked.

i've got no mail redundancy if that relay server goes down, but it will do till the virtual i;p is given a name in dns.

Thanks for all the replies

Ta

George
George_Dodds
Honored Contributor

Re: sendmail - relay Host unknown since adding dns.

.