Discarding Messages Based on Specific Characteristics

# attr NAME=discard
# Discards messages containing key phrases.
if header :matches "Subject" ["Re: Approved", "Re: Details", "Re: Movie",
                              "Re: My details", "Re: Thank you!"] {


  • If the message "Subject" header matches any of the following strings in the list: "Re: Approved", "Re: Details", "Re: Movie", "Re: My details", "Re: Thank you!"
    • The message is discarded.
    • The stop command ends message processing.

Where does this filter go?

The "discard" filter should be added directly after the "Policy Script 5: Quarantine External Blacklisted Messages" policy filter. Positioning the "discard" filter at this point ensures that:

  • The "discard" filter only executes after other PureMessage policies have filtered out spam, viruses, whitelists, blacklists, and opt-out lists.

    (A stop command from another filter will not prevent it from executing.)

  • Subsequent filters will never execute. (The "discard" filter uses a stop command to halt filtering on messages containing specific characteristics.)