Detecting Spam

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.

Note: The optional "PureMessage-Policy-Spam" component is required to use the "spam detection" 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;
}

Description:

Where does this filter go?

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:

Related concepts
Policy Script 6: Calculate Spam Probability, Modify and Deliver