cPanel® Hosting

What is cPanel®
Logging in/out
Server information
Mail
Change Password
Domains
Subdomains
FTP Manager
File Manager
Disk Usage
Password protect directories
Error pages
MySQL
Redirects
FrontPage Extensions
Web/FTP Stats
Subdomain Stats
Raw Access Logs
CGI Center
MIME types
Apache handlers
Hotlink Prevention
Index Manager
IP Deny Manager

Email Filtering

Email Filtering
You can block an email using spam filters for either a user's email account or your entire hosting account. There are many definitions of spam, but one particularly useful one is the following:

Spam is the electronic version of junk mail, and has been around since the Internet was created. Email filters are a way of filtering your email to remove unwanted mail based on a variety of criteria. You can block any sort of email, not just mail of a commercial nature. Blocked mail can be deleted automatically or sent to another email address or script. These filters are quite flexible - some examples are provided after the instruction on how to add a spam filter below. All filters are cumulative.

Also refer to Spam Assassin for another approach to dealing with spam.

To add an email filter:

  1. Log into the control panel.
  2. Click on the User Level Filtering OR Account Level Filtering icon from the main page.
  3. If you're changing or adding user level filtering, Click on the Manage Filters link at the side of the email account.
  4. Click the Create a new Filter button.
  5. Click on the required header field in the first drop-down list. These are the various fields in any email message.
  6. Click on the required filter action in the second drop-down list. This action will act on the text entered in the third field.
    • equals - match the text exactly (whole words only). "Credit" will block "Credit".
    • matches regex - matches the text based on regular expression (regex) rules. Regular expressions are a powerful but complex area. You do not need to use regular expression filters for most circumstances.
    • contains - match the specified text in any circumstance. "porn" will block "porn" and "pornography". Be careful as entering some words such as "sex" here would have an effect on words such as Middlesex or Sussex.
    • does not contain - useful if you're looking for a specific reference and wish to reject any emails not containing that.
    • begins with - match the specified text when it is the beginning of a word. "porn" will block "porn" and "pornography" but not "teenporn".
    • does not begin with - useful for filtering forwarded emails "Fwd:" or replies "Re:".
  7. Enter the filter text in the third field. This text is case sensitive.
  8. Enter the destination for the filtered email in the Actions field.
Adding a spam filter

Topics:

Deleting an email filter