Hey guys

I'm trying to do a PCRE match on the body for the word 'blah' (the goal of 
which is to create wordlists inside exim for policy filtering).  

Leaving the merits of wordlists aside for a moment, can anyone tell me why the 
following condition is not matching? 

I have the following driver in exim.conf:

>central_filter:
>  driver = redirect
>  domains = +local_domains
>  file = /etc/exim/filter1
>  no_verify
>  user = exim
>  group = exim
>  allow_filter
>  allow_freeze

which contains the following:

>#Exim filter  <<== Do not remove`
>logfile /tmp/filter.log 0644
>if (${lookup{$message_body}wildlsearch{/etc/exim/wordlist}{yes}{no}} is "yes")
>   then logwrite "match"
>endif

the following test email:

>To: testuser1 <[EMAIL PROTECTED]>
>From: Ashkan Soltani <[EMAIL PROTECTED]>
>Subject: Test1
>
>blah
>
>end

and the following wordlist

>"blah  end  "
>Test1
>^\bblah\b 
>*blah*

running this command:

>/usr/sbin/sendmail -bF filter1 -f "[EMAIL PROTECTED] <[EMAIL PROTECTED]>" -bfd 
>testdomain.com -bfl testuser1 -d+lists < test


here is the truncated result:

>Logfile /tmp/filter.log
>Logwrite "here!\n"
>search_open: wildlsearch "/etc/exim/wordlist"
>search_find: file="/etc/exim/wordlist"
>  key="blah  end  " partial=-1 affix=NULL starflags=0
>LRU list:
>  D/etc/exim/wordlist
>  End
>internal_search_find: file="/etc/exim/wordlist"
>  type=wildlsearch key="blah  end  "
>file lookup required for blah  end  
>  in /etc/exim/wordlist
>blah  end   in "blah  end  "? no (end of list)
>blah  end   in "Test1"? no (end of list)
>blah  end   in "^bblahb"? no (end of list)
>blah  end   in "*blah*"? no (end of list)
>lookup failed
>Condition is false: 
>${lookup{$message_body}wildlsearch{/etc/exim/wordlist}{yes}{no}} is yes
>Filtering did not set up a significant delivery.
>Normal delivery will occur.

What am I doing wrong?  Is there a better way to create wordlists in Exim for 
content filtering?
-a


-- 
## List details at http://www.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://www.exim.org/eximwiki/

Reply via email to