Hi, 

I would like to write some more complex rules, and would like advice on the best 
approach.  I have seen some mention of modifying eval_tests.pm to do this sort of 
thing.  Is that required?  Or can I achieve what I want in regular .CF files?

Here are two (simplified) examples:

1. I want to find a string that matches on the regular expression  /peni(s|$)/.  I 
want to temporarily store the string that matched, and then test whether it includes 
the character "$".  The idea being that a hit on "peni$" will score higher than a hit 
on "penis".  What is the best way to store a matched string and perform further tests 
just on that string?

2. Similarly, I would like to create a rule that penalizes the appearance of the 
recipient name in the subject of an email.  This rule would first parse the "to" field 
and extract and store the recipient's mail name ("ehart" for example).  It would then 
test the subject field to see if this stored mail name is contained in the subject.

Any help appreciated!

Cordially,

Eric

----------------------------------------------------------
Eric Hart
Network Performance, Inc. (NPI)
ehart [nospam] npi.net



=== All NPI email scanned for spam and viruses by SpamRejector(tm).  SpamRejector.net 
===

Reply via email to