Show/Hide Toolbars

To get to this page, to to Mail Connectors → (choose Mail Collector) → POP3 Routing → Edit Download Rules

This page lets you configure rules for how VPOP3 processes messages it downloads from a remote POP3 server.

downloadrules1_zoom50

VPOP3 processes download rules in order from top to bottom. When it finds a rule whose conditions match the incoming message, it will process the rule, and then stop processing any further messages (except where stated otherwise below in the Action descriptions). You can re-order the rules by clicking the up/down arrows to the left of the rule names.

Note that the same Download Rules apply to all POP3 Mail Collectors. Use the Collector rule condition if you just want a particular rule to apply to a particular collector. For incoming SMTP use SMTP Rules instead.

You can add a new rule by pressing the Add Rule button at the top of the page, delete a rule by pressing the Delete button to the right of the rule name, or edit the rule by pressing the Edit button to the right of the rule name. Changes to rules take effect immediately, so there is no Submit button; just press the Close button to close the editor.

When you add or edit a rule, the rule editor will be displayed as below

downloadrules2_zoom50

The Name box contains a name you specify for the rule. The name can be anything, but it is best to make it something meaningful to make the rules easier to maintain and to help when looking in log files.

The Action box lets you specify what happens when the rule conditions match. See the Action Descriptions section below for more details.

The Redirect to box lets you specify an email address which the message should be redirected to if the rule matches. This box is only present for Redirect actions. A similar Copy to box is displayed for Copy rules. You can specify multiple email addresses by separating them with commas. With VPOP3 Enterprise you can also specify a target folder for local targets by adding a space and the folder name after the username - eg fred Customers, bob will send it to the "inbox" for the user "bob" and the "Customers" folder for the user "fred".

For Set Header actions, there is a Header Line box where you can specify the header line to add.

The Condition match box lets you specify whether all the conditions must match for the rule to be triggered, or only any one of the conditions must match.

Below this you specify the conditions for the rule. You can specify as many conditions as you want. Press the Add Condition button to add a new condition, and delete an existing condition by pressing the relevant Delete button. See the Condition Descriptions section below for more details.

Action Descriptions

Query - VPOP3 will send a message to the original recipient(s) of the message showing them the message headers and asking them if they want to download the message. If they reply to the query message, then VPOP3 will download the message during the next POP3 collection. The message on the ISP will be deleted after the Query Download Delay if it the user does not respond to the message.

Download - the message will be downloaded as normal

Delete and Warn - the message will immediately be deleted from the ISP POP3 mailbox and the intended recipient(s) of the message will be told that the message was deleted.

Ignore - the message will not be downloaded from the ISP POP3 mailbox, but it will not be deleted immediately either. It will be deleted when the message ages beyond the Leave messages on server setting for the Collector.

Redirect - the message will not be delivered to the original recipient(s) but will be redirected to the recipients specified in the Download Rule.

Delete Silently - the message will immediately be deleted from the ISP POP3 mailbox, and no notification about the deletion will be generated.

Download and Delete - the message will be downloaded and delivered as normal, but it will also be immediately deleted from the ISP POP3 mailbox without waiting for the Leave messages on server time specified for the Collector.

Redirect Query - VPOP3 will send a message to the recipient(s) specified in the Download Rule showing them the message headers and asking them if they want to download the message. If they reply to the query message, then VPOP3 will download the message during the next POP3 collection. The message on the ISP will be deleted after the Query Download Delay if it the user does not respond to the message.

Delete and Warn other user - the message will immediately be deleted from the ISP POP3 mailbox and the recipient(s) specified in the Download Rule will be told that the message was deleted.

Redirect, Download and Delete - the message will be downloaded and redirected, but it will also be immediately deleted from the ISP POP3 mailbox without waiting for the Leave messages on server time specified for the Collector.

Copy - the message will be delivered to the original recipient(s) as well as to the recipients specified in the Download Rule.

Copy Query - VPOP3 will send a message to the original recipient(s) of the message as well as to the recipient(s) specified in the Download Rule showing them the message headers and asking them if they want to download the message. If they reply to the query message, then VPOP3 will download the message during the next POP3 collection. The message on the ISP will be deleted after the Query Download Delay if it the user does not respond to the message.

Delete and copy Warning - the message will immediately be deleted from the ISP POP3 mailbox and the original recipient(s) as well as the recipient(s) specified in the Download Rule will be told that the message was deleted.

Copy, Download and Delete - the message will be downloaded and copied to the specified recipient(s), but it will also be immediately deleted from the ISP POP3 mailbox without waiting for the Leave messages on server time specified for the Collector.

Headers only - VPOP3 will download only the message headers (not the message body) and deliver them to the original recipient(s).

Redirect Headers only - VPOP3 will download only the message headers (not the message body) and deliver them to the recipient(s) specified in the Download Rule.

Copy Headers only - VPOP3 will download only the message headers (not the message body) and deliver them to the original recipient(s) as well as to the recipient(s) specified in the Download Rule.

Reject - VPOP3 will send a delivery failure notification to the sender of the message and the message will not be downloaded.

Set Header and Continue - VPOP3 will add a message header to the incoming message. VPOP3 will then continue to process further Download Rules. (Note that the header is modified AFTER the download rules have run, so you cannot check for the changed header in later download rules).

Set Header and Stop - VPOP3 will add a message header to the incoming message. VPOP3 will then not process further Download Rules.

If - if this rule does not match, VPOP3 will not process any more rules until it encounters an Else or EndIf rule.

Else - this type of rule cannot have any Conditions. It must be used after an If rule.

EndIf - this type of rule cannot have any Conditions. It must be used after an If or Else rule.

Stop - VPOP3 will stop processing any further rules, and the default action will take effect (usually Download).

 

Condition Descriptions

Conditions have 4 parts:

1.the type of condition

2.optional Not flag. If this is set, then the match operator is inverted (eg if the match operator is 'Contains', then if you check the Not box, the match condition becomes 'Does not contain')

3.match operator (eg Contains, Equals etc)

4.data

Condition Types

The condition type can be ANY message header field, as well as some special pseudo-headers.

Common header fields to check are From, To, Subject etc. Note that if VPOP3 is checking a message header field it does not process the header data, but uses the full data from the raw header. This means that if you check for "From" "Equals" "bob@company.com", it is actually unlikely to match messages from bob@company.com. This is because often the From header would actually say From: Bob Wright <bob@company.com>, so VPOP3 will be comparing Bob Wright <bob@company.com> to just bob@company.com, and they are not equal.

You can check multiple headers by separating them with commas - a common example would be To,Cc to check both the To and Cc header fields. If either header matches, then the condition matches.

The pseudo-headers supported by VPOP3 are:

Always - if the data is '1' then the condition matches, if the data is '0' then the condition doesn't match. The actual message data is not checked at all.

TimeNow - this checks if the time now is within the range specified by the condition data. You can specify times as hh:mm or just hh and indicate ranges by using the '-' character. Eg '9:00-17:00' will match if the current time is between 9.00 am and 5.00 pm inclusive or 9-17 will match if the current time is between 9.00am and 5.59 pm. If you do not specify a From time, then 0:00 is assumed. If you don't specify a To time, then 23:59 is assumed. VPOP3 uses the local time on the VPOP3 computer for time checks. The match operator is ignored.

DayNow - this checks if the day of week now is specified in the condition data. Sunday is 1, Monday is 2 etc. So, DayNow - 135 will match if the current day is Sunday, Tuesday or Thursday. The match operator is ignored.

Rcpt - this checks to see if the recipient specified in the condition data is in the calculated recipients for the message (after Mappings etc have been processed). The match operator is ignored.

Collector - this checks to see if the current Mail Collector name or number is the one specified in the condition data. The match operator is ignored.

Size - this checks to see if the message size matches the condition data as indicated by the match operator.

ValidRecipients - this checks to see if the number of valid recipients for the message matches the condition data as indicated by the match operator.

InvalidRecipients - this checks to see if the number of invalid recipients for the message matches the condition data as indicated by the match operator.

Any - this checks all the message headers against the condition data as indicated by the match operator.

Match Operators

All matches apart from regex matches are case insensitive. Numeric data is checked numerically for numeric operators like greater than etc. If you check numeric data with contains, begins with, regex etc, then the numeric data is converted to a string a tested as text.

equals - the value matches the condition data exactly.

is - the same as equals

not equals - the value does not match the condition data.

greater than - the value is greater than the condition data (text data is compared alphabetically).

greater or equal - the value is greater than or equal to the condition data (text data is compared alphabetically).

less than - the value is less than the condition data (text data is compared alphabetically).

less or equal - the value is less than or equal to the condition data (text data is compared alphabetically).

contains - the value contains the condition data as a substring.

wildcard matches - the value matches the condition data when processed as a wildcard string (* and ? wildcards).

begins with - the value begins with the condition data.

ends with - the value ends with the condition data.

regex matches - the value matches the specified regular expression - specified as /<regex>/<flags> - eg /my cat/i

Diagnostics

VPOP3 writes a line to message headers of downloaded messages which are affected by Download Rules. This header line begins with X-VPOP3Rules.

Also, VPOP3 creates a log file in the log path called DLRULES.LOG. This log file contains information on all download rules which are triggered.

If you think this help topic could be improved, please send us constructive feedback