Re: [EXIM] Opinion sought: filter variables

Pàgina inicial
Delete this message
Reply to this message
Autor: Kevin P. Fleming
Data:  
A: exim-users
Assumpte: Re: [EXIM] Opinion sought: filter variables
Sounds ideal to me... simple enough to understand that anyone can program
it, but also quite flexible and powerful.

Philip Hazel wrote:
>
> It has been suggested that writing filter files would be made easier if
> some kind of "scoring" facility were available. It has also been
> suggested that user variables be implemented. I feel that a full-blown
> implementation of variables would amount to a mini programming language
> and would be getting out of hand. On the other hand, a very simple
> scoring system with a command like "score <n>" provides in effect just
> one variable, which is a bit restricting (though less so than no
> variables :-).
>
> What do people think about the following compromise:
>
> 10 numeric variables are available with the names n0 - n9. They start
> out with a value of zero when a filter file is entered. Their values
> can be changed by the command
>
> add <number> to <name>
>
> where negative numbers are permitted. Their values can be used in
> other commands by variable expansions such as $n0.
>
> A simple scoring scheme could be implemented by something like
>
> if <condition 1> then add 1 to n1 endif
> if <condition 2> then add 2 to n1 endif
> if <condition 3> then add -1 to n1 endif
> if <condition 4> then add 1 to n1 endif
> if $n1 above 3 then seen finish endif
> if $n1 above 0 then freeze endif
>
> with more complicated schemes making use of more than one variable.
>
> Opinions, please!
>
> --
> Philip Hazel                   University Computing Service,
> ph10@???             New Museums Site, Cambridge CB2 3QG,
> P.Hazel@???          England.  Phone: +44 1223 334714

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


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