[EMAIL PROTECTED] wrote:
> For many of these, one can observe that the "user name" in the From:
> header often also occurs in the Subject line. This could be a useful
> rule pattern, although there are bound to be false positives, so the
> score should be rather low.
> 
> I don't know off-hand if there is a way to do this in SA currently.
> I'd guess it would take a specialized eval: rule. Maybe it's not worth
> the effort.

Well, I decided it was worthwhile to play around with Perl.  I managed
to learn a little, and conjure up a bit -- it's supposed to find words
that appear in both from:, and subject: fields:

#set input

$_="from:word1\*\&[EMAIL PROTECTED]";

#move past from: part

$sMatch=$_=~/^from:\s*/igcx;

#get a list of all bounded words after reply-to:

@myList=$_=~/\w+/igcx;

#now same with subject

#reset input

$_="subject:word1\*\&[EMAIL PROTECTED]";

#move past subject and loop to match from:/subject: words

$sMatch=$_=~/^subject:\s*/igcx;

#find words that are in both subject and from

while ($i<=$#myList){

  @sMatch=($_=~/@myList[$i]/igcx);

  push(@myOtherList,@sMatch);

  $i++;
}

#print both arrays -- from: header words, and those matching in subject:

for ($i=0;$i<=$#myOtherList;$i++){

  print @myOtherList[$i],"\n";
}

print "myOtherList size:  ",$#myOtherList+1,"\n";

Bryan

> 
> /* era */
> 
> --
> The email address era     the contact information   Just for kicks, imagine
> at iki dot fi is heavily  link on my home page at   what it's like to get
> spam filtered.  If you    <http://www.iki.fi/era/>  500 pieces of spam for
> want to reach me, see     instead.                  each wanted message.
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click

-- 
Nothing in the world has more potential for beauty than woman.  Nothing
has more potential to destroy it, than the world. - (Anonymous)

http://www.wecs.com/content.htm

This signature file is generated by Pick-a-Tag !
Written by Jeroen van Vaarsel
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=pick-a-tag



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to