views:

426

answers:

2

We need to write a .Net (C#) application that monitors all mail activity through a POP, SMTP and Exchange Server (2007 and later) and essentially grab the mail for archiving into a document management system. I realise that the way to monitor each type of server would probably be different so I'd like to know what the best (most elegant and reliable) way is to achieve this.

Thanks.

A: 

Many countries have rather narrow regulations for what such a system must do and what it must not do in order to be in compliance with the law. If you are developing a product for a company in SA that wants to sell it internationally, I would suggest that need a more targeted approach. Depending on the legal framework, your solution will have to intercept and archive all emails, or just a subset. For instance, some countries do not allow the company to store private emails of employees, in which case the archival process needs to be configurable with rules that the employee can control. If the intent is to archive each and every email, then the network-level approach that Jimmy Chandra suggested is better, because it is easier to deploy.

cdonner
Part of the product brief is that archiving should happen based on user configurable rules.Jimmy's suggestion is an option, but we would not like to be IN the chain, i.e. be a point of failure. We'd rather just "listen in" if possible.
Gerhard
A: 

I don't think you need to worry about POP right? it is not used for sending mails (unless you need to monitor access to emails too).

Regarding Exchange, versions 2000 onwards have Journaling support (don't know about previous ones), so a mail is copied cto a mailbox as it is sent/recieved (there are several different options depending Exchange version, check it out). Then you can read that mailbox or set a rule to forward it to an external SMTP, and you app listen to it.

For other SMTP servers, it would be possible to get a similar approach by forwarding rules etc, and some might have custom support as Exchange has.

raticulin