Re: [Exim] system filter syntax

Góra strony
Delete this message
Reply to this message
Autor: Tabor J. Wells
Data:  
Dla: Jim Pazarena
CC: exim-users
Temat: Re: [Exim] system filter syntax
On Mon, Apr 23, 2001 at 11:53:22AM -0700,
Jim Pazarena <exim@???> is thought to have said:

> I don't quite understand how to present an "if def" in my system filter.
>
> I want to re-direct email incoming with a header using X-UIDL,
> and the following:
>
> if ${if def:h_X-UIDL}
>    then deliver spam_grabber
>         finish
> endif

>
> generates a syntax error. What have I done wrong?
>
> Also, is it redundant to include the "finish" command as shown above?
>
> TIA


This is what I use:

if "${if def:h_x-uidl {spam}}" is spam
then deliver spamtrap@???
seen finish
endif

See section the filter specification for details. Basically, if there is a
X-UIDL header then the condition evaluates to "if spam is spam" which is
of course, true. :)

The "finish" command just tells it to stop checking other rules in the
filter. You'll probably want to add the "seen" as well. Again see the exim
filter spec for details.

Tabor

-- 
--------------------------------------------------------------------
Tabor J. Wells                                     twells@???
Fsck It!                 Just another victim of the ambient morality