Bug 2946 - Add new test which matches the body of a message to a file of fixed strings
Summary: Add new test which matches the body of a message to a file of fixed strings
Status: RESOLVED WONTFIX
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: Rules (show other bugs)
Version: unspecified
Hardware: Other All
: P5 enhancement
Target Milestone: 3.0.0
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-01-18 15:30 UTC by alan robinson
Modified: 2004-02-26 15:07 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description alan robinson 2004-01-18 15:30:24 UTC
I maintain a list of URLS which have been included in spam in the past. 
Currently I use procmail to route emails that match any of these fixed strings 
to a spam file. But really, what would be ideal is if I could change the score 
of a message based on if it matches one of the many fixed strings in an 
external file. 

Ie, I right now I use the following in procmailrc:
 
:0HB:
* ? formail -c | fgrep -sFi -f $HOME/qtrashlist
likelyspambyurl

but instead I'd like to be able to add to my user_prefs file:

rawbody BADURLS eval:matchfile('/usr/me/qtrashlist', 'case-insensitive')
Comment 1 Theo Van Dinter 2004-02-27 00:07:26 UTC
the only way I can think of to implement this would be a foreach/while loop that does a inefficient RE 
match per message, which is definitely not what you want to do.

I would either generate a list of rules based on the strings you want and do it that way, or have the 
faster procmail method add a header via formail or something, and score that in SA.