Jakob Hirsch wrote on 9/03/2006 12:14 AM:
> you don't need to fiddle in ACLs (and it wouldn't work with that, anyway).
>
>> LIKE '$sender_address'
>>
>> if acl_m9 contains "1" then
>
> That would be $acl_m9. But as said, it's not needed. Just use
>
> if ${lookup mysql {SELECT COUNT(*)...}} is above 1
> ...
>
> Untested, I never used lookups in a filter.
>
> Oh, and use '${quote_mysql:$sender_address}'.
>
>> headers add "New-Subject: [foo] ${escape:$h_subject:}"
>
> probably better use ${rfc2047 than ${escape here.
>
> put the "if ... endif" stuff into a file (e.g. /etc/exim/system-filter)
> and the following lines at the top of your exim.conf:
>
> system_filter = /etc/exim/system-filter
> system_filter_user = your_exim_user
>
> But you should really read (at least) the documentation of Exim's
> filtering facilities.
Thanks, I've read a document on Exim's filtering features, and have
decided on the following in my system_filter;
--
if ${lookup mysql {SELECT COUNT(*) FROM addresses WHERE email LIKE
'${quote_mysql:$sender_address}'}} is above 1
then
headers add "New-Subject: [foo] ${rfc2047:$h_subject:}"
headers remove Subject
headers add "Subject: $h_new-subject:"
headers remove New-Subject
endif
--
However, it merely returns
Filter error: unrecognized condition word "mysql" near line 10 of
filter file
I'm using Debian testing with v4.60-4 of exim4 (exim4-daemon-heavy).
What might be wrong? MySQL lookups work elsewhere in my exim4 config..
cheers
Michael