1.Login into cPanel.
2.Click “User Level Filtering” under the “Mail” section.
3.Click on Manage Filters next to the account which you wish to add filter.
4.To add a filter, click on “Create a New Filter”.
5.In the “Filter Name” field, enter a name for the filter.
6.In the first drop-down menu under Rules, select a message characteristic.
From – address from which the message was sent
Subject – the subject line of the message
To – address to which the message was sent
Reply Address – address to which the reply will be sent
Body – body or content area of the message
Any Header – a header of the message
Any recipient – a recipient of the message
Has not been previously delivered – affects messages still in queue for delivery
is an error message – affects error messages received from an auto-response system
7.In the adjacent drop-down menu, select an operator.
equals – exactly matches the string you define
matches regex – matches a regular expression you define
contains – contains the string you define
does not contain – does not contain the string you define
begins with – begins with the string you define
ends with – ends with the string you define
does not begin – does not begin with the string you define
does not end with – does not end with the string you define
does not match – is not equal to the string you define
In the field below, enter the filter or characteristics you wish to use as the filter. (Regular expressions are accepted.)
You can remove and create multiple filtering rules by clicking “+/– ” sign.
8.In the Actions drop-down menu, select an action for the rule you created.
Discard message – destroys the incoming message with no failure notice
Redirect to email – redirects the message to another email address that you specify
Fail with message – discards the message and automatically returns a specified failure notice to the sender
Stop processing rules – skips all filter rules
Deliver to folder – deposits the message into a specified folder
Pipe to a program – sends the incoming message to a program you have specified
9.Click Create to initialize the filter.
Once the filter is created there should be a “You have successfully created a new filter” message.
When visiting the Edit Filters section again, the new filter will be in the list of filters. Here is where the filter can be edited or removed.