| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| 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. I replace Solaris with Redhat ES 4, but the same problem turns up. Do you ever meet the problem? I have been in the trouble for several weeks. Any hints are deeply appreciated! Best regards, Jacky |
|
#2
| |||
| |||
| In article <87361457-c48d-4fda-be96-165c83cd2efd@w1g2000prk.googlegroups.com> Jacky Wu <serenitywu@gmail.com> writes: > >It is strange that my sendmail does not accord to the hosts order in >solaris nsswitch.conf. The hosts order in nsswitch.conf governs the working of gethostbyname(), gethostbyaddr() & Co, i.e. name <-> IP-address translation. E-mail transport generally needs more, namely MX records, which are only available through DNS, and per the RFCs MX records MUST take precedence over name->IP-address mapping. I.e. there is a mismatch between what sendmail needs and what nsswitch.conf can provide, and sendmail tries to make the best out of this situation: If 'dns' is *anywhere* in the 'hosts' line, MX records are looked up *first*, and only if no MX records are found are name -> address mappings tried in the order specified. >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. This could possibly be due to host3 having an MX record in DNS, with an MX target that doesn't exist - but there may well be other explanations. I'd suggest that you try to clean up your name service setup in general instead of trying to get sendmail to hunt around in three different services to find e-mail destinations - e.g. make sure that everything is in DNS. --Per Hedeland per@hedeland.org |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.