Filter Configuration Options

For cPanel version 11.30

Options Available in the Rules Box

  • 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 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.
    • note Note: The spam score correlates to the number of plus (+) signs in the Spam Bar header.

Operators Available in the Rules Box

  • equals — Exactly matches the string you define below.
  • matches regex — Matches a regular expression defined below.
  • 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.
    • note Note: The filter text box will accept regular expressions (when you select the matches regex operator), rather than more commonly used wildcard characters (such as * or ?).


The following are only applicable when the Spam Score option is selected.

  • is above (#s only) — Scores greater than the number you define will be subject to the action.
  • is not above (#s only) — All scores equal to or less than the defined number will be subject to the action.
  • is below (#s only) — All scores below the defined number will be subject to the action.
  • is not below (#s only) — All scores greater than or equal to the specified number will be subject to the action.

Actions

  • 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.
    • note Note: This option is only available via Account Level Filtering (not User Level Filtering), for security reasons.

Using the "Pipe to a program" option

When piping to a program, you should enter a path relative to your home directory. If the script requires an interpreter, such as Perl or PHP, you should omit the /usr/bin/perl or /usr/local/bin/php portion. Make sure that your script is executable and has the appropriate hashbang.

  • #!/usr/local/bin/php -q — For PHP.
  • #!/usr/bin/perl — For Perl.

If you are using PHP, ensure that your code is appropriately wrapped in start and end tags.

Make sure that your script uses the proper file permissions (0755). To change your script's file permissions:

  • chmod 0755 myscript.php where myscript.php is meant to stand for your script's location and file name.

Topic revision: r7 - 29 Jul 2011 - 16:13:31 - Main.MelanieSeibert