Sendmail does not accord to the hosts order in nsswitch.conf

15 pts.
Tags:
hosts
LDAP
nsswitch.conf
Sendmail
Solaris
Unix
Dear Friend, My sendmail does not accord to the hosts order in solaris nsswitch.conf. Please let me elaborate in details. Thank you. Setting: solaris 9 /etc/nsswitch.conf hosts: file [notfound=continue] ldap dns sendmail 8.13.4 /etc/mail/sendmail.cf O ServiceSwitchFile=/etc/nsswitch.conf hosts in /etc/hosts host1, host2 hosts in ldap host3 Testing result/problem /usr/lib/sendmail can sendmail to user@host1 and user@host2, but it cannot email to user@host3. It complains that hosts unknown. Setting 2: Then I remove 'dns' from /etc/nsswitch.conf: hosts: files ldap Testing result/problem /usr/lib/sendmail can sendmail to user@host1 and user@host2, and also to user@host3. But sendmail cannot send email to external domain, such as user@sun.com, because dns is removed from nsswitch.conf file. Setting 3: I change the order of files, ldap, dns in nsswitch.conf, but it is no luck. I also test this in Redhat Linux AS 4, it is the same problem. Do you ever meet the problem? I have been in the trouble for several weeks. Any hints are deeply appreciated! Best regards, Jacky
ASKED: September 5, 2008  2:00 AM
UPDATED: October 3, 2008  4:07 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

I believe that I would use the following entries:
<pre>hosts: files ldap dns</pre>
Remove the <pre>[notfound=continue]</pre> part.
Put an entry into /etc/hosts for host 3.

hth
-j

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Jackyyjwu
    Dear j, Thanks your answer. The [notfound=continue] does not influence the result. It can solve the problem to put host3 into /etc/hosts just as host2, but my final goal is to put all entry in ldap, rather than /etc/hosts. Any other hints are appreciated greatly! Best regards, Jacky
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following