Re: [exim] ${if in Filters (Exim 3.35)

Top Pagina
Delete this message
Reply to this message
Auteur: Peter Bowyer
Datum:  
Aan: exim-users
Onderwerp: Re: [exim] ${if in Filters (Exim 3.35)
Richard Torrens <richard@???> wrote:
> Can someone please help? I'm trying to filter out emails with multiple
> recipients. I've established that $recipients_count works, but can't
> get the filter working.
>
> What I've got so far is:
> ${if > {$recipients_count} {1}
> logwrite
> "$tod_log\t$header_To\t$original_local_part\t$sender_address\t$message_id"
> save mail/10_MultiTo
> finish
> }
>
> but this gives an error:
> Filter error: unknown filtering command "${if" near line x of filter
> file 4qd@dinopsis:~$
>
> I can't see why. The Exim 3 instructions indicate that ${if should
> work.


1) You should consider upgrading, your version of Exim is coming up for 3
years old and barely supported

2) Having said that, the filter syntax hasn't changed since your version,
and is fully documented at
http://www.exim.org/exim-html-3.30/doc/html/filter.html (Your version).

You've confused general config file syntax with filter syntax. You need
something like

if
$recipients_count is above 1
then
logwrite ....
save ...
endif

That assumes that $recipients_count is available in a filter in Exim 3 - the
docs are not explicit on this.

You might also look at the 'personal' test for the sort of thing you're
trying to do - might help.

Peter