Create Spam Filters for Mailing Lists

This document explains how to create mail filter rules in cPanel's Mailing Lists interface (Home >> Mail >> Mailing Lists). Mail filters allow you to control which email messages that your server delivers.

To control which email messages that your server delivers to your mailing lists, use Mailman's Spam filters interface. To access Mailman's Spam filters interface, click the Manage link that corresponds to the mailing list that you wish to edit.

Creating Mail Filter Rules

To create a mail filter rule with the Header filters section of the Spam filters interface, perform the following steps:

  1. In the Spam Filter Rule 1 text box, enter a regular expression (regex) that matches the messages to which to apply an action, for example:

    X-Spam-Status:\s+Yes
  2. Next to Action:, select the action for Mailman to perform on the messages that match the filter. The following table describes the available options:

    Option
    Explanation
    Defer This option disables the filter rule.
    Hold This option directs Mailman to hold the messages that match the filter rule until a moderator approves it.
    Reject This option directs Mailman to reject the messages that match the filter rule.
    Discard This option directs Mailman to delete the messages that match the filter rule.
    Accept This option directs Mailman to accept the messages that match the filter rule.
  3. Click Submit Your Changes.

Was this answer helpful?

 Print this Article

Also Read

How to Create a Subdomain in cPanel

A subdomain is a subsection of your website that exists as a subdirectory in your public_html...

Removing cPanel Accounts with /scripts/removeacct Script

The /usr/local/cpanel/scripts/removeacct script terminates cPanel accounts from the command line....

Using .htaccess File to Block IPs

You may block access to your website from specific IP addresses using .htaccess file. You need to...

Disabling mod_security in cPanel

Mod_security is an apache module that helps to protect your website from various attacks. It is...

Creating a Spam Email Filter

To create a spam filter, perform the following steps: Navigate to cPanel's  Apache...