Quarantining Spam Messages

Many sites prefer to quarantine messages that are more "spammy" than a given threshold to reduce the volume of messages in their users' mailboxes. This snippet contains the following code.

if pmx_spam_prob :over 80 {
    pmx_quarantine "Spam";
    stop;
} 
elsif pmx_spam_prob :over 50 {
        pmx_replace_header "Subject" "[SPAM:%%GAUGE%%] %%SUBJECT%%";
        pmx_add_header "X-PMX-Spam" "Probability=%%PROB%%";
}

Messages with a spam probability greater than 80% will be quarantined immediately. Messages with a spam probability between 50% and 80% will be delivered, but with their subjects marked and an X-PMX-Spam header added.

The pmx_quarantine action copies the message to the PureMessage quarantine and prevents the original message from being delivered. The "Spam" argument is the reason for quarantining the message. This string should be a single word (if you use any spaces, they are silently changed to underscores).

Messages that have been quarantined can be viewed, released and added to a digest using features on the Quarantine tab in the PureMessage Manager.