User Tools

Site Tools


how_to:write_your_own_spam_filter_rules

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
how_to:write_your_own_spam_filter_rules [2010/07/05 11:39] – created paulhow_to:write_your_own_spam_filter_rules [2013/11/25 09:25] paul
Line 1: Line 1:
 ======How to write your own spam filter rules====== ======How to write your own spam filter rules======
  
-VPOP3's spam filter uses a basic scripting language designed for filtering email messages, so a full description of writing your own rules would be very long and complex, as it is really something that only a programmer should do. You can download a [[http://www.pscs.co.uk/downloads/vpop3/VPOP3_Spam_Filtering.exe|description of the script language]].+VPOP3's spam filter uses a basic scripting language designed for filtering email messages, so a full description of writing your own rules would be very long and complex, as it is really something that only a programmer should do. 
 + 
 +For technical reference, see our [[reference:spam_filter_rules|Spam Filter Rules documentation]]. 
  
 A basic thing that people might want to do is to filter on a phrase, you could do this simply by editing the 'spamrules_userchecks.txt' file in the VPOP3 directory, use something like: A basic thing that people might want to do is to filter on a phrase, you could do this simply by editing the 'spamrules_userchecks.txt' file in the VPOP3 directory, use something like:
Line 13: Line 16:
 </code> </code>
  
-If you put the text to search for in quotes, then VPOP3 will do a simple substring match. For more flexibility you can use regular expressions, and surround the regex pattern in '/' characters. VPOP3 uses PCRE regexes.+If you just have the text to search for, then VPOP3 will do a simple substring match. For more flexibility you can use regular expressions, and surround the regex pattern in '/' characters. VPOP3 uses PCRE regexes. If the search text or regular expression contains spaces, then you need to surround the search expression with " quotes.
  
 eg eg
Line 22: Line 25:
 Body /this\s+is\s+a\s+message\s+body\s+(phrase|sentence)\s+to\s+(check|test)\s+for/i 100 Body /this\s+is\s+a\s+message\s+body\s+(phrase|sentence)\s+to\s+(check|test)\s+for/i 100
 AnyText /this\s+is\s+something\s+to\s+check\s+for\s+in\s+the\s+subject\s+(?i:OR)\s+body/ 100 AnyText /this\s+is\s+something\s+to\s+check\s+for\s+in\s+the\s+subject\s+(?i:OR)\s+body/ 100
 +Body "/this is a regular[- ]expression with spaces in/i" 100
 EndBulkScan EndBulkScan
 </code> </code>
  
how_to/write_your_own_spam_filter_rules.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1