I need a system to archive email on a dedicated server with about 10-20 email accounts. The server is running CentOS4, Exim mail in maildir format. MySQL4.1 is installed and available to use, as well as apache and PHP5.
I'm looking for someone to refine my ideas below and turn it into a usable program.
Essentially, mail needs to be archived either by having my smtp server relay mail on to the archiving software (which would then relay the mail back after doing the archival), or by archiving directly from maildir folders. I currently use mailscanner to scan for spam and viruses. There must be a mechanism for users to identify legimate mail from the spam folder, and only the legitimate mail (and not the spam) will be archived.
There will be settings to identify which domains/email addresses to archive as well as which not to archive. There should also be a default account that email can be archived to if it is not on the list of rules to be archived or not.
The mail must be indexed and compressed. I don't care how it is stored (in a DB or on the filesystem) as long as it is robust. I want to be able to store archived email offsite when the archives get too big (>150GB), but the index must be searchable even if the mail is offsite, and there must be a mechanism for identifying the filename or DB location of the email so that it can be restored.
The user will have a web-based front end (which they will securely log in to) that will give them access to their own mail stores. Each user might have one or multiple mailboxes, which can be searched independently or together. The administrator will have access to all mailboxes and will be able to search all mail.
The search can be based on to, from, subject, email body and attachments. It should use some sort of boolean logic (ie. AND/OR/NOT logic).
The resultant emails will be viewable through the web interface, and the attachments will be downloadable. The user will also have the option of having the message redelivered to the original mail box.
That describes the project in a nut shell. Obviously there will be fine details to iron out once development begins.
Please let me know if any clarification is required.