Re: [exim] IPv6 address comparison, and callout vs VRFY

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: David Woodhouse
CC: exim-users, Wouter Verhelst
Subject: Re: [exim] IPv6 address comparison, and callout vs VRFY
On Thu, 9 Dec 2004, David Woodhouse wrote:

> On Mon, 2004-11-22 at 10:16 +0000, Philip Hazel wrote:
> > The point that bothers me is that in a host list in an ACL or router,
> > there are in effect two identifiers, the IP address and the name. Both
> > are implicit. The question the is: if a match_host condition is
> > implemented, do you allow the caller to specify an IP address, or a
> > name, or both? Clearly one can come up with some rules such as "specify
> > only the IP address, and if a name is required, it is looked up", but I
> > was never sure about what would be right, so I just ducked out of doing
> > it.
>
> My understanding was that existing host lists take only an IP address,
> generally obtained from getpeername(). They look up PTR records to find
> a name if they need to, depending on the contents of the host list in
> question. But I don't ever see where their input is a _name_. Am I
> missing something?


No, you are just looking at it in a slightly different way from me.
Which is good. Alternative viewpoints often clear up difficulties. I was
thinking of a host having both a name and an IP address, and, for an
incoming client host, the fact that the name was only looked up when
needed was an implementation optimization.

Your approach is the same as my comment in quotes near the end of
my paragraph above. That approach could certainly be adopted. Then you
could use

${if matchhost{$sender_host_address}...

My worry is that somebody is sure to try

${if matchost{$sender_host_name}...

(or even some other name) because they don't really understand the
issue. I guess one could diagnose that as an error.

Anyway, this item remains on the Wish List. It would require quite a lot
of refactoring of the code, IIRC, because the current code assumes it is
working with the client host IP and name (for example, if it looks up a
name, it stuffs it into $sender_host_name).

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book