1. bluehost knowledge base

Email Management: Account-Level Email Filters

Email filters follow strict logic to block unwanted messages from reaching your inbox. They can be set for an individual email account or for all of your email accounts. Follow the steps below to set up a filter: 

Create an Email Filter

  1. Log in to your Bluehost control panel
  2. Go to Hosting > Email
  3. Click Email Filters.
  4. Click the New Filter button.
  5. Account: Select "All email addresses" or a single address from the drop down menu. 
  6. Filter Name: Enter a unique name to identify this filter.
  7. Click Next

The Rules

Next, you're going to create a set of filter rules, or if/then statements to define how your email is filtered. You can add and remove rules by clicking the + button. 

When you create a filter using several operators, it may be useful to note that cPanel will always process the "and" operator before the "or" operator. As a result, email filters will be processed as follows:
  • A and B or C will be processed as (A and B) or C.
  • If you wish to create a filter such as (A or B) and (C or D), you would have to create it like so:
    (A and C) or (A and D) or (B and C) or (B and D).
Follow the steps below to continue: 
  1. In the first drop-down menu, 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
    • Spam Status - the status SpamAssassin has been conferred on the message; it begins with either "Yes"Â� or "No."Â�
    • Spam Bar - the content of the Spam Bar header that SpamAssassin has generated for this message. This header contains plus (+) signs to denote the likelihood that the message is spam; more plus signs means the message is more likely spam.
    • Spam Score - the overall spam score assigned to the message by SpamAssassin, expressed in digits.
  2. In the next 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
  3. In the text box, enter the characteristics to define your filter.
  4. 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
  5. Finally, click Create.

For more information about configuring mail filters, check out this cPanel article