Filtering messages using rules

VPOP3 Enterprise lets the administrator and user configure 'rules' for processing messages as they arrive in the user's mailbox.

As an administrator, to access the rule configuration, click on Users at the top of the VPOP3 settings, double-click on the user in question and go to the Message Rules tab.

usermessagerules1_zoom50

To create a new rule, press the Add Rule button. To delete a rule, select it in the table, and press the Delete Rule button. To view or edit a rule, double-click on the rule in the table. You can alter the order of the rules by dragging & dropping them within the table.

Adding or editing a message rule

Press the Add Rule button on the user's Message Rules tab.

usermessagerules2_zoom50

oRule Name - This is the name you want to give to the rule. It is sensible to give the rule a meaningful name. For example use something like "Handle messages from initrode" rather than "Rule 1".

oConditions - These are the things that VPOP3 checks when processing a message.

oActions - These are what VPOP3 does if the message matches the conditions.

oAll conditions need to match - If this is checked then all the Conditions need to match the message for the Actions to be performed. If this is not checked, then if any one of the Conditions matches, the Actions will be performed.

oMessage Types - This indicates what sort of messages will be checked by this rule. Incoming = messages arriving at VPOP3 from outside (incoming SMTP or downloaded POP3 messages). Local = messages sent using SMTP from a local IP address. System = messages sent by VPOP3 itself (eg error messages, alerts, etc).

Conditions

The conditions are things that VPOP3 checks in the new message. To add a new condition, click the Add link next to the word Conditions. To remove a condition, select it and press the Remove link. To edit a condition just click a checkbox or double-click a word in the conditions table. Conditions are unordered, so there is no way to move them up or down in the list.

The available conditions are:

oSubject - The message subject is tested. Text

oTo - The entry or entries in the To message header field are tested. Text

oCc - The entry or entries in the Cc message header field are tested. Text

oTo or Cc - The entry or entries in the To and Cc message header field are tested. Text

oFrom - The entry or entries in the From message header field are tested. Text

oFrom, To or Cc - The entry or entries in the From, To and Cc message header field are tested. Text

oBody - The contents of the message body are tested. Text

oSize - The size of the message is tested. Numeric

oSpam Score - The score assigned by the VPOP3 spam filter is tested. Numeric

oQuarantined - Whether or not the message will be quarantined is tested. Checkbox

oMarked Read - Whether or not the message will be marked as read is tested (note that this is only checked as the message is put into the mailbox, the rule is not processed again when the user marks the message as read later). Checkbox

oKeyword - IMAP4 Keywords assigned to the message are tested (note that this is only checked as the message is put into the mailbox, the rule is not processed again when the user changes message keywords later). Text

oFlagged - Whether or not the message will be marked as flagged (starred) is tested (note that this is only checked as the message is put into the mailbox, the rule is not processed again when the user flags the message later). Checkbox

oPrevious Rule Match - Which rules have previously matched against the message are tested. Note that this uses the assigned names for the rules, so if you change rule names later, you may need to change any rules which check for other rules. Text

oDate Now - The current date is tested (note that this is only checked as the message is put into the mailbox, the rule is not processed again when the date changes). Date

oTime Now - The current time is tested (note that this is only checked as the message is put into the mailbox, the rule is not processed again when the time changes). Time

oMessage Date - The date in the message's Date header field is tested. Date

NOTE:

Message headers do not contain BCC header fields, so that is why there is no way to test that value here.

For each condition you can say whether the test should be performed in a case insensitive way by checking the box in the I column. For non-text conditions such as Size or Quarantined, this setting is ignored.

You can also invert the condition by checking the box in the N column. For instance, if the condition would normally be Subject contains text, then checking the box in the N column will change the condition to be Subject DOES NOT contain text.

There are 5 types of condition as shown in italics in the list of conditions above:

oText - Text conditions can be tested for Equals, Not Equals, Less than, Less than or equal, Greater than, Greater than or equal, contains, wildcard, Regular Expression. The ordering tests are performed as alphabetic comparisons (case sensitive or case insensitive as determined by the I checkbox). For instance "hello" is greater than "goodbye", and "400" is greater than "3000". Contains performs a substring search. Wildcard allows DOS-style wildcards, and regular expression lets you use regular expressions for complex checks. When message header fields are being checked, the message data is decoded from any MIME format and converted to the UTF-8 character set, so comparisons should use the decoded form of the message header data, not the raw, encoded, form.

oNumeric - Numeric conditions can be tested for Equals, Not Equals, Less than, Less than or equal, Greater than, Greater than or equal, contains, wildcard, Regular Expression. The ordering tests are performed as numeric comparisons. For instance "400" is less than "3000". Contains performs a substring search. Wildcard allows DOS-style wildcards, and regular expression lets you use regular expressions for complex checks.

oCheckbox - Checkbox conditions match to either true or false.

oDate - Date conditions are performed as text comparisons against the date in YYYY-MM-DD format.

oTime - Time conditions are performed as text comparisons against the time in HH:MM format.

Actions

The actions are things that VPOP3 does if the rule matches. To add a new action, click the Add link next to the word Actions. To remove an action, select it and press the Remove link. To edit an action just click a checkbox or double-click a word in the actions table. Actions are unordered, so there is no way to move them up or down in the list.

The available actions are:

oStop processing after this rule - Once VPOP3 has finished processing this rule, it will not check for any more rules. Note that VPOP3 will continue to process all actions in this rule even if the Stop processing rule appears before other rules in the list.

oFlag message - Mark/unmark this message with an IMAP4 flag (or star, depending on the email client used) depending on the checkbox state.

oDelete - Delete/undelete this message depending on the checkbox state.

oQuarantine - Quarantine/unquarantine this message depending on the checkbox state.

oMark read - Mark the message as read or unread depending on the checkbox state.

oAdd keyword - Add an IMAP4 keyword to the message.

oCopy to folder - Copy to the specified IMAP4 folder.

oMove to folder - Move to the specified IMAP4 folder.

oForward to - Forward to the specified email address.

oSet forward sender addr - When forwarding the message, use the specified email address as the message sender.

oModify headers - Add or remove message headers as specified. To add or modify a message header, specify the header field name and data (eg x-myinfo: Bibble). To remove a message header, specify the header field name with no data (eg x-myinfo).

If VPOP3 processes several rules for a message that may appear to conflict, then it will use the latest actions of that type, or merge the actions as seems appropriate. For instance, if a message matches three rules with the following actions (in this order), the result will be as described at the end:

1.Delete. Copy to folder "abc". Add keyword "important".

2.Undelete. Move to folder "spam". Add keyword "spam".

3.Forward to "jim@example.com". Flag message.

The results will be:

oThe message will not be deleted (or will be undeleted) - the undelete action in rule 2 overrides the earlier delete action in the earlier rule 1.

oThe message will have keywords important AND spam added.

oThe message will be put into folders "abc" AND "spam", but NOT kept in the Inbox folder - the move action in rule 2 takes precedence, so the message is moved to the folders rather than copied.

oThe message will be flagged.

oThe message will be sent to jim@example.com as well.

Advanced Rules

Message rules only allow you to check for all conditions, or for any conditions. In a single rule you cannot check for any of those conditions AND all these conditions as well. However, you can achieve the same by using multiple rules and the Previous rule match condition.

For instance, if you want to flag a message if (the subject is either aaa or bbb) AND (the sender is joe@example.com), there is no way to do this in a single rule.

You could create two rules, one which checks for: aaa in the subject AND joe@example.com in the sender, and the second which checks for: bbb in the subject AND joe@example.com in the sender. However, if there are lots more options for the subject, then this can quickly become unwieldy.

So, an alternative way would be to have one rule ('say "rule 1") which checks for ANY of: "subject is aaa" and "subject is bbb". Then have a second rule which checks for ALL of: "previous rule match equals rule1 and sender is joe@example.com".