1832274 Members
2014 Online
110041 Solutions
New Discussion

sendmail / mailx

 
SOLVED
Go to solution
Richard Woolley
Frequent Advisor

sendmail / mailx

One of my hp-ux 11 machines wont send mail, i found this is due to a file called nsswitch.conf. However when i fix it and set all the entries to files. It will work until its next reboot (at weekends) and it seems to go back to trying DNS. Has anyone got the steps of how I can keep these settings even after the machine reboots?
7 REPLIES 7
Ian Dennison_1
Honored Contributor

Re: sendmail / mailx

This is /etc/nsswitch.conf?

That is really weird; are you sure the reboot is not reconfiguring or re-installing a package?

Share and Enjoy! Ian
Building a dumber user
Richard Woolley
Frequent Advisor

Re: sendmail / mailx

Im not sure about that, how could i check that it is trying to re/install packages?

Its funny because today i have it working but chances are i'll have to mess about with files and stop/start the sendmail daemon again
Ian Dennison_1
Honored Contributor

Re: sendmail / mailx

Get a look at the nsswitch file's date and time stamp after a reboot, then scan through /etc/rc.log to find out what was happening at that particular date/time.

Silly question: Are the changes you made in a valid format, perhaps internet services are rejecting the changes?

Share and Enjoy! Ian
Building a dumber user
Ceesjan van Hattum
Esteemed Contributor

Re: sendmail / mailx

Maybe a bit overdone, but are you sure that you configured /etc/mail/sendmail.cf correct?
Most common mistakes are made by incorrect Dj$w (your domain) and DS (relay host).
As far as i know sendmail doest not resolve names using nsswitch.conf whatsoever.

Greetings,
Ceesjan
T G Manikandan
Honored Contributor

Re: sendmail / mailx

Hello,
You have configured your machine to a dns server.As you configure your machine to a DNS server you get a entry in the /etc/resolv.conf file with the
domain name
DNS server ip-add

Then you have the file /etc/nsswitch.conf file to search order for resolving the hostnames.
So if you do not want to use your DNS server then remove the entries from the /etc/resolv.conf file and edit your /etc/nsswitch.conf to use files to resolve your hostname.

Thanks
G Manikandan
Sanjay_6
Honored Contributor
Solution

Re: sendmail / mailx

Hi Mark,

If you don't want the sendmail to use DNS, edit the file /etc/mail/service.switch. Change the entry for "hosts".

Hope this helps.

Regds
Richard Woolley
Frequent Advisor

Re: sendmail / mailx

I shall have to keep my eye on the time/date stamp of the nsswitch.conf file after the reboot this weekend.

sendmail.cf file is correct.
I have been told sendmail will try and use DNS if it is in the nsswitch.conf file (even if it is the 2nd or 3rd entry), so DNS must be removed from this altogether which i have done.
Our unix servers do not use DNS and the nsswitch.conf file is good.

thanks for all your ideas and support everyone. I'll see how it goes on monday.

cheers,

:)