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

Top Page
Delete this message
Reply to this message
Author: David Woodhouse
Date:  
To: Wouter Verhelst
CC: exim-users
Subject: Re: [exim] IPv6 address comparison, and callout vs VRFY
On Thu, 2004-11-18 at 00:30 +0100, Wouter Verhelst wrote:
> grep_remote:
> driver = manualroute
> domains = grep.be
> condition = ${if eq{$sender_host_address}{2001:838:37f::209:6bff:fe27:7db2}{false}{true}}
> route_list = grep.be samba.grep.be
>
> I don't know of any other way to do this (in fact, I wrote the above
> router after a suggestion from this list). Sorry about the confusion.


> The problem, thus, is that when doing ${if string comparison on IP
> addresses, this comparison is done on IP addresses in the representation
> as exim receives them from whatever source they are supplied from,


You're right it probably ought to be canonicalised. I was going to
suggest ${if match_host($sender_host_address}{2001:838...}{0}{1}}
but match_host isn't actually implemented.

The documentation has the comment "This is because hosts have two
identities: a name and an IP address, and it is not clear how to specify
cleanly how such a test would work. At least, I haven't come up with
anything yet."

Personally I'd be inclined to make match_host take a numeric IP address,
canonicalise it and match it against a hostlist. I don't see where we'd
want to use a _name_ as the item to match in a hostlist.

--
dwmw2