[EXIM] lsearch ${lookup in filter file?

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Dan Birchall
Date:  
À: exim-users
Sujet: [EXIM] lsearch ${lookup in filter file?
It might be (and I hope it is) just that I didn't get enough
sleep last night, but the $lookup portion of the filter docs
on Nigel's website seems like Greek to me this morning (I
guess the references to "data lookups in files and databases,
as discussed in chapter **" don't help either - anyone want
to put the right chapter number in? ;)

In a nutshell (a most suitable container) I'm trying to
check $local_part@$domain against a plaintext list of
addresses. If it matches, and another criteria is met, the
mail should be frozen, if not, it should be delivered. i.e.

if (the address is in the file)
and (the other criteria is met)
then freeze endif

Not really all that logically daunting... but as noted above
I'm not grasping the syntax (or something) of ${lookup here.
Here's what I've got as a single-criteria test filter:

if ${lookup{$local_part@$domain:foo}lsearch{/etc/bar}{$value}} is "baz"
then freeze endif

Over in /etc/bar, I have:

djb@???: foo=baz

The idea of course is that if the test works, any incoming mail
for me will be frozen (not a problem, since I'm postmaster and
can easily thaw it (or just turn off the filter).

Unfortunately, mail is being delivered, so I'm guessing that
there is some glaring error in my coding which manages to
render things utterly ineffective, without breaking the
filter file to the point that any errors are actually
generated.

If it's obvious to those of you in more lucid states, please
feel free to enlighten me... :)

Thanks,

-Dan (who actually didn't party at all for the Super Bowl...)

--
Dan Birchall - Internet Sysadmin - 16 Straight Communications
Your source for great graphic design, web design and hosting.
http://www.16straight.com - 609.231.7887 - djb@???
AntiSpam. Populus Iamdudam Defutatus Est - Spam Delenda Est!

--
*** Exim information can be found at http://www.exim.org/ ***