Genii Weblog

CoexLinks: Check before processing (corrected)

Thu 21 Jul 2011, 05:09 PM



by Ben Langhinrichs
Note: I accidentally posted this earlier without its content. I thought it was in draft, but no. Oops!

A question came in from a customer today regarding why CoexLinks did not process a message that was already in MIME, and whether there were other flags or conditions that would prevent a message from being processed. I thought I'd share and elaborate on the answer to give an idea of how CoexLinks works.

Answer (modified slightly to clarify for blog):

It is a basic assumption and requirement for CoexLinks that the message be in rich text format. There are two reasons for this. The first is that after the conversion to MIME by the native engine, some of the loss of information has already occurred. We could still read the MIME (the engine has that ability for other reasons, but it is not used), but if the information to generate a better doclink is gone, we cannot retrieve it. The second reason is that a great many messages would have to be processed that shouldn't need to be. Since every email routed through a server would need processing, all the inbound mail (already in MIME) would be processed, as well as any email already converted by a client or server that routed through your gateway. That would be a huge load added to the server for many companies, with virtually no gain.

That said, here are the tests applied to a message to determine whether to process it at all. The order is determined by the philosophy that you should do the least processing necessary to determine whether to skip, as CoexLinks scales up to very, very heavy loads. The first four checks are unlikely to apply to most people, but I added them for completeness sake. Numbers 5 and 6 are the ones which block the majority of messages that are blocked.

1) If the environment variable COEXDocLinkType is set to 0 (usually a temporary way to turn off CoexLinks), skip processing.

2) If the environment variable COEXLimitToDB is set (not common), skip if the database is not one of the specified databases.

3)  If any of the environment variables COEXExcludeHintServer or COEXExcludeHintServers or COEXIncludeReplicaID are set (not common), skip if the hint server or replica id doesn't match criteria.

4) If the environment variable COEXSkipNoLinksItem is set (only used in very heavily loaded systems with no mails created by agent), skip if the $Links field does not exist.

5) If the COEXStampDate item exists and has a time within the last five minutes, skip processing. This item is set by CoexLinks to ensure that multiple servers don't need to process the same message multiple times.

6) If the Body item is already in MIME, skip processing.

7) If the COEXDocLinkType is set to 2 (generate NDL attachments) and there are already NDL attachments, the message is skipped. This check is going away with Version 3 because there are corner cases where it does not process replies and forwards as it should.

Copyright © 2011 Genii Software Ltd.

What has been said:

No documents found