Re: [Exim] [sleclerc@actionweb.fr: Bug#119747: Problem with …

Top Pagina
Delete this message
Reply to this message
Auteur: Philip Hazel
Datum:  
Aan: Mark Baker
CC: exim-users
Onderwerp: Re: [Exim] [sleclerc@actionweb.fr: Bug#119747: Problem with host_reject_recipients and mysql]
On Sat, 17 Nov 2001, Mark Baker wrote:

> If you have a database of IP addresses to reject, can you get it to look up
> the IP address in there without doing a DNS lookup? (If this is a silly
> question, then feel free to say so; as I say, this is an area I know almost
> nothing about).


Not a silly question. It's something people trip over all the time. The
answer is "yes". The "Host lists" section in the manual tries to explain
it, but it is one of the well-known conceptual stumbling blocks. The
detail is:

In a host list:

. If you use an unadorned lookup type name, Exim looks up a host name:

     host_reject_recipients = dbm;/some/file


  . If you put "net-" before the lookup type name, Exim looks up the IP
    address:


    host_reject_recipients = net-dbm;/some/file


  . If you put "net<<n>>-" before the lookup type name, where <<n>> is a
    number, it masks the IP address, and looks up the masked address
    followed by /<<n>:


    host_reject_recipients = net24-dbm;/some/file


So, if you received a call from the host xyz.example, whose IP address
is 10.9.8.7, in the three cases the keys that are looked up are

  "xyz.example"      for dbm
  "10.9.8.7"         for net-dbm
  "10.9.8.0/24"      for net24-dbm


Exim will only do the DNS lookup to find the host name if it needs it.

OK?

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