Re: [exim] lsearch

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Phil Pennock
Ημερομηνία:  
Προς: Sergei Gerasenko
Υ/ο: exim-users
Αντικείμενο: Re: [exim] lsearch
On 2006-02-17 at 14:00 -0500, Sergei Gerasenko wrote:
> I'm running the current stable version of Debian and the packaged
> version of Exim 4. I'm switching from 3 and I have this problem with
> lsearch that I just can't figure out.
>
> It's a very simple scenario. I want to block hosts that are
> listed in a file. The file is in /etc/spam_hosts and has the following
> kinds of entries:
>
> IP1:
> IP2:
> ...
>
> In the ACL for receiving messages, one of the first rules I added was:
>
> deny    message       = Message rejected
>         hosts         = lsearch;/etc/spam_hosts


For IP address lookups, use a net-* search; the base form always does a
hostname lookup, the net- prefix set are for IP lookups.

Specification,
10.12 Host list patterns for single-key lookups by host address

net-lsearch is the form which does exactly what you asked for, but look
at the details for net-iplsearch too, which is more useful in many
situations (lets you specify netblocks as well as single IP addresses).

Search the Spec for the string "net-" and you'll find quite a bit of
interesting stuff.
--
I am keeping international relations on a peaceable footing.
You are biding your time before acting.
He is coddling tyrants.
-- Roger BW on topic of verb conjugation