Sendmail through DNS?

Hello Guruz,

There is a mailserver with IPrange, i could able to resolve it through DNS,

nslookup <IP>
Its resolving.

But not pinging, port 25 is open for mailserver IP.

But when i am sending mail, i am geting the below error :frowning:

dsn=x.x.x, stat=Host unknown (Name server: xxx.xxx.xxx.xx: host not found)

Could some one tell me how to configure sendmail through DNS?

What is not pingable the mail server's name or the mail server's IP address?

Does an nslookup of the mail server's name resolves to its IP address correctly?

Here is a useful looking article on DNS and mail:
DynDNS.com - Support -- Knowledge Base -- E-mail, Mail Exchangers, and DNS
but it is more about mail routing which is an essential part of configuring mail.

Please post:

The correct name of the mail server and it's IP address.

Lines from sendmail.cf which mention the mail server by name and/or by IP address.
Lines from /etc/hosts which mention the mail server by name and/or by IP address.
The output from "nslookup" both by name and by IP address.
The contents of /etc/resolv.conf
The contents of /etc/nsswitch.conf

As TonyFullerManv deduced. Please post the output from the failing "ping" command.