Re: [Exim] Opinions sought: byname vs bydns for manualroute

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Philip Hazel
日付:  
To: Yann Golanski
CC: exim-users
題目: Re: [Exim] Opinions sought: byname vs bydns for manualroute
On Tue, 19 Nov 2002, Yann Golanski wrote:

> How about playing it safe? If gethostbyname() return NULL then do a
> gethostbydns() and see what it returns. Yes, it's slightly unefficent
> but will mean that you are still able to fall back on something that
> will work and not bounce emails.


That's an interesting idea. There is, however, a snag. People use byname
when they are disconnected from the Internet and their nameservers (e.g.
for routing round a small private network). They may well have set up
gethostbyname() _not_ to do DNS lookups. So while I think this could be
useful, there must be a way of switching it off.

Hmm. How about the following:

  Default:  call gethostbyname(), if returns NULL, try DNS lookup
  byname    just do gethostbyname()
  bydns     just do DNS lookup


--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.