In some instances, it may be preferable to deliver all spam messages to envelope recipients. For example, site administrators would consider this action when initially testing and optimizing PureMessage. In this situation, a spam detection filter is beneficial for identifying spam and delivering all messages to recipients with an associated spam probability. During the optimization process, mail recipients could then comment on the accuracy of a particular filter.
# attr NAME=spam detection # Detects spam probability over 50%. # Prefixes 'Subject' header with '[SPAM:]'. # Adds an 'X-PMX-Spam' header. if pmx_spam_prob :over 50 { pmx_replace_header "Subject" "[SPAM:%%GAUGE%%] %%SUBJECT%%"; pmx_add_header "X-PMX-Spam" "Probability=%%PROB%%"; stop; }
Example: Using this filter, a message with a spam probability of 60% would have its "Subject" header prefixed with " [SPAM:##] ". A message with only 50% probability would have its "Subject" header prefixed with " [SPAM:#] ".
X-PMX-Spam: Probability=63%
The "spam detection" filter replaces the "Copy to quarantine and deliver if spam probability is 50% or more" filter in Policy Script 6: Calculate Spam Probability, Modify and Deliver. Replacing the first part of this default policy filter with the "spam detection" filter ensures that: