jackv@turnkey.tcc.com (Jack F. Vogel) (12/21/90)
Can someone tell me why sendmail is coded to be "all or nothing", as it were, dependent on the nameserver? What I mean is that the way things are set up, if you define NAMED_BIND then getcanonnname() does a res_search() and if that fails due to a server being down or whatever then you are SOL, in fact, there is no error checking at all. On the other hand, if NAMED_BIND is not defined then getcanonname() uses gethostbyname(). Now, at least with AIX the routine gethostbyname() will first attempt a nameserver query, and if that fails falls back to parsing the host file. Can someone tell me, particularly other vendors, how you handle this dichotomy? As things stand if I compile with NAMED_BIND defined that binary fails for someone not using a nameserver. I am considering altering getcanonname() to fall back on the host file, but I was wondering whether there was something I was missing?? Has no-one run into this before??? Any enlightenment appreciated. -- Jack F. Vogel jackv@locus.com AIX370 Technical Support - or - Locus Computing Corp. jackv@turnkey.TCC.COM
jstewart@ccs.carleton.ca (John Stewart) (12/21/90)
In article <1990Dec21.121210.17836@turnkey.tcc.com> jackv@turnkey.TCC.COM (Jack F. Vogel) writes: >Can someone tell me why sendmail is coded to be "all or nothing", as it were, >dependent on the nameserver? What I mean is that the way things are set up, >if you define NAMED_BIND then getcanonnname() does a res_search() and if that >fails due to a server being down or whatever then you are SOL, in fact, there >is no error checking at all. On the other hand, if NAMED_BIND is not defined >then getcanonname() uses gethostbyname(). Now, at least with AIX the routine >gethostbyname() will first attempt a nameserver query, and if that fails >falls back to parsing the host file. There are good arguments for having your nameserver database be "the" authority for the mapping of machine names to IP addresses in your domain. If this policy is followed, the hosts file should never contain a mapping that isn't defined in your nameserver. This is the policy we follow here at Carleton. The transition from host files to the nameserver as the authority was not entirely smooth, it did take some time for everyone to understand why they couldn't just add an entry to the hosts file to allocate an IP address for a new machine. -- --- Artificial Intelligence: What some programmers produce. Artificial Stupidity: What the rest of us produce.
rickert@mp.cs.niu.edu (Neil Rickert) (12/21/90)
In article <1990Dec21.121210.17836@turnkey.tcc.com> jackv@turnkey.TCC.COM (Jack F. Vogel) writes: >Can someone tell me why sendmail is coded to be "all or nothing", as it were, >dependent on the nameserver? What I mean is that the way things are set up, <(...) >falls back to parsing the host file. Can someone tell me, particularly other >vendors, how you handle this dichotomy? As things stand if I compile with Well, I am not another vendor. My observation is that many vendors ship two versions of 'sendmail' with their software. They call one 'sendmail' and the other 'sendmail.mx'. I like the idea of two version, but I think they do it wrongly. They should ship one as 'sendmail.mx' and the other as 'sendmail.nomx' Then they should install a link from 'sendmail' to 'sendmail.nomx' in their default setup. Preferably a symbolic link should be used if the system supports it. This approach makes it easier to see which mailer is being used, and reduces the risk of inadvertently deleting on. For systems that use NFS and diskless workstations, they should go one step further: make '/usr/lib/sendmail' a symbolic link to '/etc/sendmail', and make '/etc/sendmail' a symbolic link to either '/usr/lib/sendmail.nomx'. This of course sounds very complex, but it allows the main server to use 'sendmail.mx' and the diskless workstation to use 'sendmail.nomx' while at the same time both share a common '/usr' partition. >NAMED_BIND defined that binary fails for someone not using a nameserver. I >am considering altering getcanonname() to fall back on the host file, but >I was wondering whether there was something I was missing?? Has no-one run The problem with this approach is that it makes mail unreliable. At present if you are using an MX mailer, and the network link temporarily fails, the messages go into the queue due to nameserver lookup failure. With your approach during network failures the messages affected will all be bounced with 'Unknown host'. If using a nameserver, make your host a secondary name server (even if unofficial) for the local domain, using a nameserver such as 4.8.3 which makes a disk copy of the domain data. That way local mail can still be delivered even when there is a network failure. -- =*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*= Neil W. Rickert, Computer Science <rickert@cs.niu.edu> Northern Illinois Univ. DeKalb, IL 60115 +1-815-753-6940