On Thu, 18 Nov 2004, David Woodhouse wrote:
> 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.
The point is that if I did that, it would be incompatible with host
lists as used elsewhere, where you can use either a name or an IP
address. It would be a huge gotcha.
I suppose we could make them separate:
${if match_host_address{...
${if match_host_name{...
Or, I suppose, Exim could look up the name if you wrote something like
${if match_host{$sender_host_address}{*.a.b.c:1.2.3.4}...
I just felt uncomfortable about this feature, which is why I haven't
done anything about it.
It is probably the case the implementing the funny mixed host lists that
currently exist was the real mistake. I should perhaps have invented two
different kinds of list from the start. But far too late to change that
now.
--
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