1834088 Members
2609 Online
110063 Solutions
New Discussion

Re: Sendmail and DNS

 
Ionut Grigorescu_2
Super Advisor

Sendmail and DNS

Hi all,

I couldn't find the answer to my problem by searching this topic. I have a HP-UX11.i machine and sendmail. The box is a MMS server (multimedia messaging). Whenever it sends a mail the machine performs a DNS query, even if the target is listed in /etc/hosts and /etc/nsswitch is correctly configured - i.e. hosts : files [NOTFOUND=continue UNAVAIL=continue] dns and
sendmailvars: files dns
If I ping the same target host, it solves the name from /etc/hosts (no DNS query on the Ethereal trace)

any idea?
If it weren't for STRESS I'd have no energy at all
7 REPLIES 7
Keith Bryson
Honored Contributor

Re: Sendmail and DNS

I believe this is due to the fact that sendmail is looking-up the MX record for the domain, not the host record. This information is not in /etc/hosts.

Keith
Arse-cover at all costs
T G Manikandan
Honored Contributor

Re: Sendmail and DNS

Do you have a properly configured /etc/resolv.conf file
Ionut Grigorescu_2
Super Advisor

Re: Sendmail and DNS

Hi,

resolv.conf has 2 lines:
nameserver
mameserver

all the namelookups are succesfully.
If it weren't for STRESS I'd have no energy at all
Keith Bryson
Honored Contributor

Re: Sendmail and DNS

You should have a 'domain' or 'search' record at the top of resolv.conf. Maybe your sendmail set-up is confused about it's domain allocation. Check for the DJ entry in /etc/mail/sendmail.cf and whether you have a host AND host.domainname entry (for your server name) in /etc/hosts.

KB
Arse-cover at all costs
Ionut Grigorescu_2
Super Advisor

Re: Sendmail and DNS

Hi,

what is DJ?? there is an entry in /etc/hosts with IP address - hostname - aliases.
Why should I have this search line in resolv.conf? DNS queries are OK.
If it weren't for STRESS I'd have no energy at all
Steven E. Protter
Exalted Contributor

Re: Sendmail and DNS

DJ is a directive in the sendmail.cf file that allows you to override the domain name of the server.

If DJ is not set, the hostname of the server will be the sending domain. That is stored in /etc/rc.config.d/netconf

Assuming the domain name is less than 8 characters server.domain.com is a valid hostname that can be used.

Its important to have a valid domain name on your email that resolves on the public Internet.

If not, many mail systems, like aol, earthlink and my own won't accept you mail.

To set the Dj directive, edit sendmail.cf

change

DJ

to DJhostname.domain.com

or

DJdomain.com

If the domain resolves on the public Internet your mail will go through to almost any mail server.

Then:

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

You should be set now.

To send mail interactively to test your setup:

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

type some text

.


You will get a weath of diagnostic information.

SEP
Coffee Shop @
Corner of Emek Rafaim & Rachel Immanu
Jerusalem

Isn't wireless great?
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
Ionut Grigorescu_2
Super Advisor

Re: Sendmail and DNS

Hi, I have to check that, but thank you anyway
If it weren't for STRESS I'd have no energy at all