Re: [Exim] Using lists as OR expressions to make an effectiv…

Pàgina inicial
Delete this message
Reply to this message
Autor: Marc Perkel
Data:  
A: exim-users
Assumpte: Re: [Exim] Using lists as OR expressions to make an effective spam filter
This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
But I don't want to put the whole "http://" expression in each entry. I
want to plug the list into the middle of a larger regular expression. If
you notice my code - it does that.

What I need to be able to do is: regex(file contents as OR list)regex.

That way I can say (http\:\/\/|mailto\:).{0,15}(read|the|file).{0,10}\/

In the file I have a lisy of strings that if they appear within the URL
it's sets a header that it passes on to Spam Assassin to be scored for
points. I have lists of domains that if spam links to it - it scors
pints, and I have a separate list of white links to give minus points to
nonspam. I have about 10 lists now and growing that use this trick and
I'm now getting 99% accuracy on spam detection.

All I need is something that works like the readfile but is a little
smarter and can remove comments and blank lines. What I'm doing now is
working very well, but it's major ugly. This is a very powerful
technique to do a lot of things and I'm just scratching the surface.

Philip Hazel wrote:

>On Thu, 29 May 2003, Marc Perkel wrote:
>
>
>
>>if "$message_body:" matches
>>\x28http\:\/\/\|mailto\:\x29.{0,15}\x28${sg{${sg{${sg{${readfile{/etc/exim/lists/blocklinks}{|}}}{\\|+}{|}}}{#.*?\\|}{}}}{\\|\$}{}}\x29.{0,10}\/
>>then
>> headers add "X-Temp-Blocklink: YES"
>>endif
>>
>>Is it possible to do this with wildlsearch?
>>
>>
>
>It should be:
>
>if ${lookup{$message_body}wildlsearch{/some/file}{yes}{no}} is yes then...
>
>Note that newlines are turned into spaces in $message_body.
>
>
>
>

--