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


 
Thread Tools Search this Thread
Operating Systems Solaris Sendmail does not accord to the hosts order in Solaris nsswitch.conf
# 1  
Old 09-02-2008
Question Sendmail does not accord to the hosts order in Solaris nsswitch.conf

Dear Friend,

It is strange that 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.

Do you ever meet the problem? I have been in the trouble for several weeks. Any hints are deeply appreciated!

Best regards,
Jacky
# 2  
Old 09-05-2008
After you make the changes in nsswitch.conf, did you the inetd process?
# 3  
Old 09-05-2008
Dear bruhnf,

Thanks your reply.

I do not restart the inet process during my experiment, but after you message, I restart inet and sendmail, but sendmail still cannot send email to hosts only in ldap.

Thank you very much for your hints.

Best regards,
Jacky
# 4  
Old 09-06-2008
Hi Jacky,

Yes, after I thought about it, I realized that your system was already "seeing" the change in nsswitch.conf because of the different result when you removed dns for test 2.

Here are a couple of questions for you...

1. Can you send email to external domain in Test 1? You didn't mention that but I'm assuming you can.

2. So then my next question is, what happens if you put host 3 in your /etc/hosts file and put DNS back into the nsswitch.conf file? Can you send to everything this way? If you are unable to leave host 3 in the /etc/hosts file then just try it for this test to see what happens.

You also might want to try the above test and take ldap completely out of nsswitch.conf to see if ldap is being used at all.

Hope this helps.

Bruhn
# 5  
Old 09-07-2008
Quote:
Originally Posted by bruhnf
Here are a couple of questions for you...

1. Can you send email to external domain in Test 1? You didn't mention that but I'm assuming you can.



2. So then my next question is, what happens if you put host 3 in your /etc/hosts file and put DNS back into the nsswitch.conf file? Can you send to everything this way? If you are unable to leave host 3 in the /etc/hosts file then just try it for this test to see what happens.
1, Yes, sendmail can.

2, Yes, if I put host 3 in /etc/hosts, sendmail can send to host 3. If I remove dns from nsswitch.conf, sendmail can send to all hosts whether it is in /etc/hosts or only in ldap. so, we can find that sendmail uses ldap, but dns interrupt the normal sendmail and nsswitch behavior. I would like to know how dns makes this, and how to solve this.

Thank you.

Best regards,
Jacky
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Can't open nodes-6379.conf in order to acquire a lock: Permission denied

I am getting error on redis server on linux 7.5 after change the default path /var/lib/redis to /redisdata, and enable cluster-enabled yes. It would be really appreciate if some one can check and suggest on this issue. error code: 1240:C 09 Sep 2018 13:53:51.058 # oO0OoO0OoO0Oo Redis is... (3 Replies)
Discussion started by: nadeemrafikhan
3 Replies

2. Solaris

Configure resolv.conf and nsswitch.conf

Hi, I've installed Solaris 11.3(live media) and configured DNS. Everytime I reboot the server, resolv.conf got deleted and it created a new nsswitch.conf. I used below to configure both settings: # svccfg -s dns/client svc:/network/dns/client> setprop config/nameserver = (xx.xx.xx.aa... (1 Reply)
Discussion started by: flexihopper18
1 Replies

3. HP-UX

HPUX nsswitch.conf issue

Hi all, There wasn't nsswitch.conf file in my HPUX server. So I copied /etc/nsswitch.files to /etc/nsswitch.conf and changed the content like below. passwd: compat group: compat hosts: files dns nis ipnodes: dns files services: nis files networks: nis... (2 Replies)
Discussion started by: sembii
2 Replies

4. Shell Programming and Scripting

Loop through hosts file - cat /etc/resolv.conf

Hello... I am trying to loop through my hosts file that contains 100+ servers to check or update the nameservers on them... My while loop is breaking after the first server responds... #!/bin/bash while read line; do a=( $(echo $line | tr " " "\n") ) if }" != "" ] && }" != "#" ] &&... (1 Reply)
Discussion started by: CompSCI
1 Replies

5. Solaris

/etc/hosts.allow on Solaris 10

I added some entries in the /etc/hosts.allow on a Solaris 10 system. Do I need to bounce inetd? I have read some accounts where any changes made to the /etc/hosts.allow will be taken in automatically. And other accounts where you need to run: svcadm refresh inetd My... (1 Reply)
Discussion started by: snoman1
1 Replies

6. Solaris

[Solaris 10] /etc/hosts.allow

Hi, I am trying to find a Solaris 10 alternative to the HPUX inetd.sec functionality. I want to grant access to one service for one IP address only. # grep fme2eall /etc/services fme2eall 35000/tcp # svcs -a | grep fme2eall online Mar_09 ... (2 Replies)
Discussion started by: ejdv
2 Replies

7. Red Hat

Question about nsswitch.conf

Hi, I was told to add the "nis" in front of "files" for below lines in /etc/nsswitch.conf was not in a good practise. I tried to search in google and man page for nsswitch.conf and can't find the answer. could someone please help me? passwd: nis files shadow: nis files group: nis files... (2 Replies)
Discussion started by: beeloo
2 Replies

8. UNIX for Dummies Questions & Answers

Sendmail not working anymore after resolv.conf change

Hi there, I am having a small issue with the mail function on our controllers. Recently we set up all the boxes as NFS slave servers and mail sending was not affected. We then had to change the servers addresses in resolv.conf and now email is being queued and not being sent. I have restarted... (3 Replies)
Discussion started by: lodey
3 Replies

9. Solaris

/etc/nsswitch.conf hosts ldap dns

Hi all Is there any reason to have "hosts ldap dns" as line in /etc/nsswitch.conf ? My understanding is that ldap does not contain any host information..(?) Best regards...Ludwig (1 Reply)
Discussion started by: ludwig
1 Replies
Login or Register to Ask a Question