Operating System - HP-UX
1833692 Members
4995 Online
110062 Solutions
New Discussion

Re: sendmail.cf/MX record question

 
David O'Keefe
Occasional Advisor

sendmail.cf/MX record question

Hello

I am a sendmail novice and am wrestling with a change to the sendmail.cf file.

We run a range of HP-UX11i hosts with sendmail NOT running as a daemon - this because we do not wish the hosts to be able to receive mail.

We do however want them to be able to send mail via a non-hp-ux server - and this currently works via the following line in our sendmail.cf file on all machines...

DScurrentserver.domainx.com.au

When I change this record to...

DSnewserver.domainx.com.au

...mail sent to user@domainx.com.au gets delivered (so emails to our intranet work) - but emails to the internet stop working (ie emails sent to user@otherdomain.com don't get delivered.

A mailq command shows the following error for the unsent emails

Mail Queue (1 request)
--Q-ID-- --Size-- -----Q-Time----- ------------Sender/Recipient------------
QAA03072 5 Tue Dec 12 16:06 dokeefe
(Deferred: Name server: fall.back.host.net: host name lookup )
user@otherdomain.com.au

I suspect an MX record change may also be required so my question is as follows.

Currently the only MX record in our DNS is in db.domainx as...

IN MX 100 currentserver.domainx.com.au.

Do I need to change this record to...

IN MX 100 newserver.domainx.com.au.

Sorry about the lengthy question - but I figure the more detail the better.

Any replies appreciated.

Cheers, Dave
5 REPLIES 5
Peter Godron
Honored Contributor

Re: sendmail.cf/MX record question

Dave,
I assume you have read:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=991348

So,check your:
/etc/hosts for newserver.domainx.com.au
/etc/nsswitch.conf
/etc/resolv.conf
O=ServiceSwitchFile
David O'Keefe
Occasional Advisor

Re: sendmail.cf/MX record question

Thanks for the info - I hadn't read the article in question - but I did search the forums...

Having read the link - I can see why I might want to uncomment the service.switch line in sendmail.cf - but since both newserver and oldserver are defined in DNS and nslookups work fine for both servers - I don't understand why oldserver works fine without uncommenting service.switch and newserver doesn't.

I will continue to experiment - but if you could explain the above I would be most grateful.

Cheers, Dave
David O'Keefe
Occasional Advisor

Re: sendmail.cf/MX record question

Sorry Peter - I just re-read my follow-up and it's quite unclear what I'm asking.

What I'm trying to understand is the link between the DS entry in sendmail.cf and the MX record in DNS.

Does sendmail expect the DS entry to correspond to an MX entry in DNS?

I know this seems like an obvious question - but I'm loathe to change the DNS record (due to it's site-wide influence) without confirming my hunch. I don't seem to be able to find an answer to this question in either the BIND or sendmail doco.

Thanks again for any help you're able to provide.
Ermin Borovac
Honored Contributor

Re: sendmail.cf/MX record question

Even when you define smart host with DS directive sendmail will try to find MX records for that host unless you enclose smart host name or IP address in square brackets.

DS[currentserver.domainx.com.au]

or

DS[ip_address_of_currentserver.domainx.com.au]

So it would be interesting to see the output of

$ nslookup -q=mx currentserver.domainx.com.au

>>> (Deferred: Name server: fall.back.host.net: host name lookup )

In your case it seems that sendmail is making use of fallback mx host (FallbackMXhost) which is defined to fall.back.host.net.

So you can try placing smart host name (or IP) in square brackets as above and see it that helps.
David O'Keefe
Occasional Advisor

Re: sendmail.cf/MX record question

Thanks for the two pointers to relevant doco.

After reading the links provided and experimenting with the square brackets - I discovered that my problem was caused by the MX record for newserver pointing to a CNAME.

It took many google searches before I found out via the sendmail website that MX records should NEVER be pointed to CNAMES.

Thanks again - Dave