User Tools

Site Tools


reference:spamrules_header

Differences

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

Link to this comparison view

reference:spamrules_header [2020/10/05 17:14] (current)
paul created
Line 1: Line 1:
 +======Increase the spam score for header marker======
 +This script is for the case where your ISP adds a header eg '​X-Spam:​ Yes' to the message header, and you want the VPOP3 spamfilter to quarantine messages with that marker.
 +
 +Add the following to the spamrules_userchecks.txt file. This script file only gets processed on incoming messages (the spamrules_localmail.txt script ends the processing of locally sent messages)
 +
 +  DefineRule "​ISPSpamMarker"​ 1 "Rule to add score to if the ISP marks the message as spam"
 +  BulkScan Score [ISPSpamMarker]
 +  X-Spam /^Yes$/i 200
 +  EndBulkScan
 +  ​
 +This checks for a message header called '​X-Spam'​ in the incoming messages, and if the value of that header line equals '​Yes',​ then the spam filter will add '​200'​ onto the spam score (the default threshold for messages to be marked as spam is 100) - you can alter the 200 at the end of the line as appropriate for your requirements.
 +
 +You need to alter the '​X-Spam'​ to be the header field name added by your ISP, and the '​Yes'​ to be whatever text they use to indicate that the message is spam. 
 +
 +Note that the header check uses [[https://​www.regular-expressions.info/​tutorial.html|regular expressions]],​ so if you change it, make sure that you '​escape'​ any special characters (eg [, ], *, ., etc) by preceding them with a \ character, and use the $ and ^ anchors as appropriate as appropriate ​
  
reference/spamrules_header.txt ยท Last modified: 2020/10/05 17:14 by paul