POP3 - Message Routing
Knowledgebase Article: Read about Collecting and Routing POP3 Mail
Message Routing Tab
This tab appears on the POP3 Account Properties dialog and is used to determine how Mailtraq delivers mail downloaded from remote POP3 accounts.
Send to listed recipient(s)
If this option is selected Mailtraq routes downloaded mail to the recipient entered in the edit box. Multiple recipient addresses may be entered by separating each address by a comma, for example "box1, box2, email@example.com" (without the quotes) where the first two addresses are local mailboxes and the third may be an external address.
Enable Message Routing
The POP3 protocol was not designed to enable mail to be routed after being downloaded and this option must be used with care because the original intended recipient(s) may not be easy for Mailtraq to identify in the message headers. One example of this is provided by mailing list distributions which normally have the address of the mailing list in the To header. Some POP3 accounts provide custom mechanisms which attempt to overcome this problem, usually by placing the address of the intended recipient in a non-standard header in the message. Mailtraq interprets the headers of POP3 messages using one of the following methods:-
Ignore non-local recipients
If this option is selected, Mailtraq ignores any recipients who are interpreted to be non-local and delivers to local addresses only.
Assume all recipients are local
If this option is selected Mailtraq rewrites the interpreted addresses of any non-local recipients and treats them as being local. If the rewritten address can then be resolved as a valid local address Mailtraq delivers the message to the appropriate mailbox. If not, Mailtraq determines how the message should be handled according to the settings in the Undelivered Mail tab of the Inbox Properties dialog.
Forward non-local recipients off-site
If this option is selected Mailtraq treats interpreted addresses literally. That is, messages addressed to local recipients are delivered to the appropriate mailbox and messages addressed to non-local recipients are placed in the Outbox to be delivered externally.
Use these header fields...
Mailtraq extracts recipient addresses from the headers of messages collected from remote POP3 servers by interpreting the contents of header fields entered into this list box. Custom headers, such as "X-Apparently-To", should be entered here in preference to "To" and/or "Cc" to minimise message duplication. Mailtraq issues a duplication warning dialog if only "To" or "Cc" header fields are specified in this control. See below for further information on the POP3 message de-duplication process.
Use *ENV extension to POP3
Some service providers use an extension to the POP3 protocol which provides the original contents of the SMTP envelope in response to the *ENV command. This protocol extension overcomes the normal routing problems associated with POP3 and, if selected, Mailtraq can deliver collected mail to the correct recipient(s) with complete reliability. Check with your Internet Service Provider to determine whether this facility is available.
Extract recipients from Received: fields
If this option is selected Mailtraq scans the Received: headers of incoming messages to determine the correct recipient for each messages. If a locally deliverable address cannot be found in the Received: header fields in any of the intermediate SMTP mail relays, Mailtraq routes the message according to the settings in the Undelivered Mail tab of the Inbox Properties dialog. The following example Received: field displays the address of the recipient as firstname.lastname@example.org:-
Received: from relay.mail.isp.net ([0.0.0.0]) by mail.relay.com id abc123456
for email@example.com; 1 Jan 98 12:46 GMT
Caution - Mail collected by Mailtraq via POP3 and routed solely on the values in To: and Cc: headers can be fraught with problems. If, for example, the To: header contains multiple addresses, Mailtraq may create and deliver individual messages for each of those individual addresses and, depending on POP3 mail routing policy, those copies could also be sent to the outbox for delivery to a remote host.
If either "To" or "Cc" header entries are found in the Use these header fields control, Mailtraq constructs an internal de-duplication table of the extracted recipients and the Message-ID:, Subject: and Date: headers for all the messages in the current maildrop. Mailtraq then tries to ensure that each recipient receives only one copy of each identifiably unique message. Note, however, that de-duplicating POP3 mail in this way is not a perfect process and, because it has to be performed in isolation for each maildrop, some duplication may still occur if a recipient also appears in the To: or Cc: headers of a message collected from an earlier or later maildrop.
Ideally, if circumstances permit, SMTP mail should be used if post-delivery message routing is a requirement. Failing that, extracting recipients from specific headers, e.g. X-Envelope-To, Delivered-To, instead of from To: or Cc: headers virtually eliminates the problem of POP3 message duplication.