Filter Configuration Options

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

How to use the Pipe to Program Option

When you use the pipe to program option, enter a path relative to your home directory. For example, if your username is 'john', and your script is in your home directory at /home/john/script.pl, you would enter this in the Pipe to a Program box: test.pl

To ensure the script will work, the script must be executable. The hashbang line must also exist at the top of the script

  • If you are using PHP, this should be the hashbang line at the top of the script: #!/usr/local/bin/php -q
  • If you are using Perl, this should be the hashbang line at the top of the script: #!/usr/bin/perl

If a hashbang is not in your script, enter the path to the Perl or PHP interpreter in the Pipe to a Program box. This should be followed by the full path to the script:

  • Perl users run this command: /usr/bin/perl /home/john/test.pl
  • PHP users run this command: /usr/local/bin/php /home/john/test.php

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 (0700). To change your script's file permissions: chmod 0700 myscript.php where myscript.php is meant to stand for your script's location and file name.

Was this answer helpful?

 Print this Article

Also Read

Webmail

Webmail allows you to access your email accounts through a web browser such as Firefox,...

Email Trace

This feature allows you to review details about email delivery attempts for your account. You can...

Accessing Webmail

To access webmail: Type: https://IP:2096 into your preferred Internet browser....

Email Authentication

cPanel’s email authentication features provide information about outgoing messages. This...

MX Entry

This feature allows you to route a domain's incoming mail to a specific server. Please note...