Re: [Exim] improvments to exim

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Kjetil Torgrim Homme
Dátum:  
Címzett: exim-users
Tárgy: Re: [Exim] improvments to exim
On Thu, 2003-12-18 at 20:01, Avleen Vig wrote:
> You know what I'd like to see on conditions? Looping.
>
> condition = for i in {1 2 3 4 5} { match {$int_spam_score}{$i} {yes}{no} }


${if and {{>= {$int_spam_score}{1}} \
          {<= {$int_spam_score}{5}}} \
     {yes} {no}}


(untested)

> Nice :-) I could then actually use one router to scan for matches on
> multiple headers, and reject/deny there, instead of having to run
> through multiple routers.


I don't see why this is necessary.

> If the first {1 2 3 4 5} could be looked up in a database or lsearch'd
> a file,


yes, they can.

btw, here's how we check the SpamAssassin score, which is a string of
s'es, like "X-UiO-Spam-score: ssssssssssss"

  condition = ${if and {{match {$header_x-uio-spam-score:}\
                               {s\{${extract{spamLevel}{$address_data}}\}}}\
            {>= {${extract{spamAction}{$address_data}}}{1}}}\
                {true}}


$address_data is set first of all, it's contains the pertinent
attributes from the user's LDAP object.

> then I could even reduce the number of loops I have to pass my
> message through (and thereby make it a more efficient process?), instead
> of having to do a check against multiple routers.


--
Kjetil T.