You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2006/11/21 18:12:05 UTC

Re: if plugin lines with else functionality?

Fred T writes:
> Hello users,
> 
>   Does anyone thing it might be nice to have if plugin lines with else
>   functionality?
> 
>   Say we create some nice rules that rely on plugins but those plugins
>   aren't available, if we could create alternate rules for when the
>   plugins are not available it might help in some cases.  This might be
>   unnecessary but I was writing a meta rule that used some replace-tag
>   tests and started thinking it would be nice to have this feature.
> 
> Example:
> 
>   body __FOO1 /some foo/
>   body __FOO2 /mr\. t/
>   
>   if plugin::replacetags
>     body SOME_RULE      /<S><O><M><E><SP><F><O><O>/i
>     replace_tags SOME_RULE
>     meta SOME_FOO_RULE    (!__FOO1 && __FOO2 && SOME_RULE)
>   else
>     body SOME_RULEb     /[s5][oO]m[e3] f[o0][o0]/i
>     meta SOME_FOO_RULE    (!__FOO1 && __FOO2 && !SOME_RULEb)
>   endif
> 
> This would most likely only benefit 3rd party rule developers but who
> knows?

hi Fred -- yep, it would certainly seem useful ;)   Could you open
a bug?

--j.