Re: [exim] Using exists in filter

Top Page
Delete this message
Reply to this message
Author: Philip Hazel
Date:  
To: Marc Perkel
CC: exim-users
Subject: Re: [exim] Using exists in filter
On Mon, 7 Nov 2005, Marc Perkel wrote:

> So - why doesn't this work?
>
> if exists{"/var/spamd"}
> then
> finish
> endif


If you read the spec for filters (doc/filter.txt), you will see that
there is no filter condition "exists". The error message should tell you
that. You are confusing filter syntax with string expansion syntax.

The string expansion

${if exists{"/var/spamd"} ....

will not work either, because you have put the file name in quotes. What
you probably want is

if "${if exists{/var/spamd}{yes}{no}}" is "yes" then ...




-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.
Get the Exim 4 book:    http://www.uit.co.uk/exim-book