Loading...

Knowledge Base

Email Filters in cpanel

Email filters use the criteria that you specify to determine how to handle email messages. The following cPanel interfaces allow you to configure email filters:
 

Global Email Filters

 

cPanel >> Home >> Email >> Global Email Filters
Global email filters affect the cPanel account's email addresses.
 

Email Filters


cPanel >> Home  >> Email >> Email Filters
User-level filters affect specific email addresses on the cPanel account.
 

Filter rules and criteria


The first set of options specifies which part of the email message the system examines to determine whether the message matches your filter parameters.
 

You can choose from the following options

 

OptionDescription
Any HeaderAny part of the message's header.
Any recipientAny recipient of the message.
BodyThe message's content.
FromThe message sender's address.
Has not been previously deliveredThe system only examines messages that remain in the queue for delivery.
is an Error MessageThe system only examines error messages that an auto-response system sends.
List IDThe account's mailing lists.
Reply AddressThe address at which the sender receives replies.
Spam BarThe content of the Spam Bar header that Apache SpamAssassin generated for this message. The more plus signs (+) that Apache SpamAssassin assigns to a message, the greater the likelihood that the system marks the message as spam.
Spam ScoreThe total number of plus signs (+) in the Spam Bar value, expressed as an integer.
For more information about the Spam Score option, read the
Spam Score section below.
Spam StatusWhether Apache SpamAssassin™ marked the message as spam. The Spam Status line begins with Yes or No.
SubjectThe message's subject line.
ToThe address to which the sender sent the message.
Note:
Generally, the recipient does not receive the BCC field in an email's header. For this reason, you cannot use the BCC field in a filter.
 

Operators in filters


After you select the portion of the email message that the system will examine, select the type of comparison between that portion of the email and the criteria that you enter.

You can choose from the following options
 
OptionDescription
equalsThe message exactly matches a defined string.
matches regexThe message matches a regular expression that you define.
Note
The filter text box accepts regular expressions when you select this option, rather than commonly-used wildcard characters (for example, * or ?).
containsThe message a string that you define.
does not containThe message does not contain the defined string.
begins withThe message begins with the defined string.
ends withThe message ends with the defined string.
does not beginThe message does not begin with the defined string.
does not end withThe message does not end with the defined string.
does not matchThe message does not exactly match the defined string.
 

Spam Score

 

The following options are only applicable when you select the Spam Score option:
 
OptionDescription
is above (#s only)The message's Spam Score is greater than the number that you define.
is not above (#s only)The message's Spam Score is equal to or less than the number that you define.
is below (#s only)The message's Spam Score is less than the number that you define.
is not below (#s only)The message's Spam Score is greater than or equal to the number that you define.

Note
 
When you create a filter that uses several operators, the system processes the and operator before the or operator. For example:
  • The system processes A or B and C as A or (B and C).
  • The system processes A and B or C as (A and B) or C.
 

Criteria


Enter the criteria to use in the text box under the Rules menus. The type of data that you enter determines the comparison that the system performs.
 
For example, if you select the From and Equals filters, enter [email protected] as the criteria. The system determines that any email from [email protected] matches the filter, but does not match [email protected] because it contains additional letters.

Note
 
Exim converts newlines into spaces in the $message_body field. Do not add \n characters to any body filters that you create.
 

Actions
 

When cPanel determines that an email message matches your filter, it handles that message with the any of the following actions that you specify:
 
ActionDescription
Discard MessageThe system discards the incoming message with no failure notice.
Redirect to emailThe system forwards the message to another email address that you specify.
Fail with messageThe system discards the message and automatically send a failure notice to the sender.
Stop Processing RulesThe system skips all filter rules.
Deliver to folderThe system delivers the message to a specified folder.
Pipe to a programThe system sends the incoming message to a specified program. For more information, read the Pipe to a Program section below.
 

Loading...