Forgot your password?
typodupeerror
Communications Data Storage

A Programmatically Accessible Email Archive? 61

Posted by Cliff
from the email-archives-on-steroids dept.
JohnnyConatus asks: "Does anyone know of a service that offers corporate email archiving and also provides a read-only interface for accessing the archived emails programmatically? Ideally this would be in the form of an database connection or a web service. My current employer is required by the SEC to archive all email communication with clients and we would like to incorporate the archived emails into our internal applications. I have called just about every email archive service I could find via Google, and while most offer a web application to search the emails, none so far have a solution for doing so programmatically. For various reasons, archiving the emails ourselves is considered the last resort. If we had to implement archiving locally, a program that archived by acting as a mail gateway would be the ideal since we'll be supporting a wide-range of mail servers."
This discussion has been archived. No new comments can be posted.

A Programmatically Accessible Email Archive?

Comments Filter:
  • but it was a mail client where all the mail was stored in an SQL database.

    the mail was POP'd in, and it went straight into an SQL database somewhere; it was actually very fast and very reliable.

    Perhaps you could do something similar. SQL is pretty ubiquitous.
    • Perhaps you could do something similar. SQL is pretty ubiquitous.

      Totally. It would be so simple to do. Just have a script on your mailserver to link a script to write the email (breaking down into the various fields) and attachment to a relational database. Super easy. Use a robust database, prioritise write speed, would probably have to be pretty massive size wise as you'd be writing every single email for 7 years (I think that's what the SEC requires, but don't cite me in court!). Infact, it coul
      • Just have a script on your mailserver to link a script to write the email (breaking down into the various fields) and attachment to a relational database.
        I wrote a set of PHP scripts a couple months ago that will do exactly this. If anyone's interested, e-mail me for a zip of the files: cfinke at gmail.com
    • Exchange4Linux [exchange4linux.org] does exactly this. Works pretty well, we've got a shitload of email (videos too), 5000+ contacts and all manner of data sitting in a PostgreSQL database.

      It's NICE being able to execute SQL queries on your aggreate communications data. Perfect example: Our Asterisk head-end system knows which of our customer service people is on pager duty with an SQL query which looks at their service calendar. :-)

      • Our Asterisk head-end system knows which of our customer service people is on pager duty with an SQL query which looks at their service calendar.

        Ah, it only knows if they should be on duty. You really need to fix a GPS scanner and electrode to their spine to ping them (and get unique response) to really know if they're on duty. And if that works, to send them a few dud messages from the customers they're there to support, e.g. "my scanner says it has 0xF4C83D, I'm running NetBSD-experimental.0.03.01.
    • Take a look at Oracle Colaboration Suite.. Calendar, Files, and Email, all stored in a big ass Oracle Database.
  • IMAP (Score:4, Insightful)

    by g_bowskill (801731) on Thursday August 04, 2005 @01:41PM (#13242034) Homepage

    If all of the emails are stored in an imap account then you could access this programatically using PHP's Imap functions. I do the same thing using a cron job to check an email account every 5 minutes on my site, if theres a new mail it looks to see if it has an image attachment and if it has automatically posts it online for me.

    Information about PHP's Imap functions can be found at http://uk.php.net/imap [php.net].

    I'm not entirely sure if this is the kind've thing you are looking for, but this is probably how I would deal with the problem.

    Regards,

    Grant

    • Re:IMAP (Score:3, Funny)

      by eoyount (689574)
      I'm not sure you should let everyone on /. know that you automatically post images in your email...
  • by spribyl (175893)
    You said to did a google search but did you talk the the obvious choice. Google.

    They seems to have something of a specialty in archiving e-mail and search technology and usually have some kind of API.
  • IMAP as the API (Score:3, Interesting)

    by GuyWithLag (621929) on Thursday August 04, 2005 @01:53PM (#13242177)
    How much mail does your company move per day? Thousand of messages? A gig in attachments per day?

    You could very easily implement this as a simple forwarding daemon, or as an plugin to your existing MTA, just store all mail going anywhere in a separate, append-only mailbox, then use IMAP to access it remotely.

    IMAP is an industry-proven protocol, there exist many open-source implementations, and has been specifically developed for situations where the mail will remain on the server. It provides you with searching and tagging, plus you can organize the mail store as you see fit (f.e. each years mails in a separate folder, while still able to search all of them at once) (sort known spam in a separate folder while keeping it around). Granted, I'm not aware of any IMAP server that uses an SQL back-end, so this may become a bottleneck for you.
    • Re:IMAP as the API (Score:3, Informative)

      by LetterJ (3524) *
      I personally use IMAPSize [broobles.com] to archive my IMAP mail that is needed mostly for historical purposes. Just yesterday, I pulled 12,000 messages off of my IMAP server for long-term storage. It turns them either into an mbox file or individual emails. I've then got a script that dumps them into a database as well as just zipping them up for burning to optical media. The database is for quick searching, the files for backup/recovery. I looked for the solution mostly to speed up my IMAP server and client both, which
      • Yeah right, IMAP will not come close to dealing with the kind of volume that a large company would need. It has to be an SQL db, but one that can also be accessed with IMAP clients. In other words DBmail (dbmail.org)
    • Has anyone made and IMAP server that stores the email in a SQL database? I heard that exchange was going to start doing this. Just had to wonder if something like that has been done in the open-source community.
      • I love SQL and relational databases myself, but what would be the point of using such a system in this case?
        • Indeed!

          mbox and maildir have been around for a long time; they have been designed by experts to store mail which is a very different problem to storing hierarchical column data. You could make the argument that all email conversations are hierarchical, but...

          Personally, I have every email for about the last ten years in maildirs; I know that so long as my data is kept safe and secure [thefilehighclub.com], I will be able to read the emails in ten years' time.

          There was even an application featured in a Linux magazine a couple of
        • The ability to do SQL queries on a database store maybe? To use JDBC or ODBC to interface with the stored email?
          MySQL for example has full text search capability.
  • So, you need to archive emails for an organization that has multiple flavors of mail servers, and you need the archive to be accessible by internally developed applications.

    It sounds like you need all of your mail servers configured to dump incoming and outgoing messages to a database.

    I don't do much mucking around with mail servers, so if they don't have any easy integration with databases, I'm sure you could have them log to a file, with a scheduled script that loads any logged messages into the databa
  • Java (Score:2, Interesting)

    by hexghost (444585)
    The javamail api can do everything you need, and you can plug bouncycastle's api along with it so you have it PGP encrypted.
  • Write a Perl app to access the web server programmatically. This is pretty simple. The first time I used LWP, it was 15 minutes from the time I started searching CPAN, found, downloaded, and installed LWP, and had an app running which read a web form and POSTed the values we needed. It took another couple of days to polish it up, add in some error checking and consistency checking (did they change that web page on me?), etc, but LWP is very easy to use.
  • by scotpurl (28825) on Thursday August 04, 2005 @02:18PM (#13242520)
    http://www.dbmail.org/ [dbmail.org]

    is one starting point, but there are a few others.

    You're basically replacing /var/spool/mail with an SQL back-end. Things like MBOX or IMAP will suck for dealing with millions of records/messages, but SQL should handle it easily.
  • Assentor (Score:2, Informative)

    by Anonymous Coward
    We have the same SEC requirements here and we use iLumen's Assentor [ilumin.com] products. The configuration was painful initially, but it's quite effective. Here's an article [s-ox.com] on the Sarbanes-Oxley Compliance Journal. It stores ALL email and IMs and the contents and functionality can be made accessible via APIs or database calls.
  • by Anonymous Coward

    Disclaimer: I work for a company that makes SOX compliance appliances.

    The SEC requires you to keep all email in house. As far as we can tell that means your storage must be in house, not at a service provider.

    We don't provide such an interface. In our products. We want as few possibilities for bugs where you can delete/alter email as we can. By sticking to our interface we have a better chance of keeping you from doing something illegal (which could reflect on us). However we do provide a web inte

  • EMC Centera for email storage. Its a CAM. You can find a couple of test Centeras on the 'net (but they will have data trashed periodically).

    Will retain records pursuant to a number of different gov requirements for reporting.

    Use Kasten Chase for encrypting, if needed (we have an object shim -- and this is a plug). That will give you your data security.

    Maybe other solutions... but that's the one I am familiar with.

    Ratboy.
    • Strap on Legato Email Extender and Documentum, or any of the other Centera partner products, and you should have a solid solution.
  • I came across this company in the past as a potential job opportunity. Sounds like they do exactly what you want, however I do believe their application is Windows specific (or it was at the time). They also offer IM archival using their client.

    www.messagerite.com
  • ... I've had good success at archiving all my previous department's e-mails (actually, what we were calling "e-mail journals") using Zope and a tiny product on top of that called MailBoxer. Provides nice web-brouseable/searchable interface to the archives, and Zope can be extended via python to do what you want to do.

    Paul B.
  • Shouldn't be that hard to slap a Java or PHP front-end on top of a SQL database to do what you want. I'd look at sourceforge[1,2] to see if someone's already built it.

    [1] Sourceforge is owned by the same folks that own slashdot.
    [2] I'm not affiliated with either, except as a user.
  • this [veritas.com]? Veritas provides a CLI to all their other products, I'd be terribly surprised if this was an exception.
  • About two years ago I completed an in-house project that involved integrating sendmail (via pipes), PHP (for text handling), and MySQL, to archive all messages in a set of MySQL tables that can then be queried later. Separately, I have a web-based search and browsing system. If you're interested in using these tools to build out your email repository, you'll find my contact info at phpconsulting.com. It doesn't handle attachments very well, but that could be built out without too much hassle.

    For what it'
  • I suggest a homegrown solution. If you primarily need to archive (but not search) emails then just use PostgreSQL (or MySQL i suppose).
    If you'll need to search them, forget a database and use a Lucene [apache.org] index. You could also store all the text verbatim in lucene and forget the database.
  • http://profitability.net/email-archiving-complianc e.html [profitability.net]

    Looks like that does exactly what you're looking for.
  • Do some research ... (Score:4, Informative)

    by gstoddart (321705) on Thursday August 04, 2005 @04:19PM (#13243927) Homepage
    If your company is doing this for SEC compliancy (meaning Sorbanes-Oxeley) you really need to look into all that goes along with this.

    You'll still need to provide security as to who can view messages. Search for legal purposed. You have document rentention scheduled you'll need to adhere to. You'll potentially have a freakin' huge volume of data to look it.

    I'm seeing a lot of references to PHP and Java classes -- something as important as SEC regulations for e-mail archiving shouldn't just be thrown together willy-nilly. Failure to get it right could cause *huge* legal problems downstream.

    Mail archiving for SEC/SOX is an utterly non-trivial undertaking.

    Cheers
  • You might want to contact Symantec about this. The primary reason they bought Veritas [and to a lesser degree Brightmail] was to make this sort of SEC mandated email archival setup.
  • Well, what about Google?

    They have a indexing appliance as well as a Google API? That way your company can also keep all its indexed email in its own data center.

    http://www.google.com/enterprise/gsa/features.html [google.com]

  • I'm not sure about your office, but my employer uses Microsoft Outlook and Microsoft Exchange servers. Microsoft Access can 'link' data from Microsoft Outlook data sources, and access the messages as records in a table. You can then run a query in MS Access to insert that data into another table on a proper database server, and then use any technology you like to access the data there.

    If your employer doesn't use Microsoft Exchange servers, this advice won't really apply to you.

    If you're a moderator and y
  • Courier (Score:3, Informative)

    by bobv-pillars-net (97943) <bobvin@pillars.net> on Thursday August 04, 2005 @05:03PM (#13244481) Homepage Journal
    Courier [courier-mta.org] has an optional "big-brother" mode that makes a copy of every email that passes through. It can be set up as an email gateway and has a flexible authentication and filtering mechanism with standard plugins for SQL, LDAP, PAM, and others.
  • but what does the poster mean by 'programmatically accessible' email archive?
    • but what does the poster mean by 'programmatically accessible' email archive?

      "Programmatically accessible" means accessible by a computer program.

      I.e., software that not only hs a user interface (GUI or CLI) but has a function library, or TCP protocol suite, or web services, or RPC, or REST, or some other way to access the data and functionality of the software, from other software.

  • Check with Fox Technologies [foxtechnologies.com] (formerly known as TFS Tech and TenFour). The TFS Gateway did multiple mail system integration and automatic e-mail retention way back in 1997 when I used to work there. They seem to be pushing SOX compliance pretty hard these days so give them a call.

Dennis Ritchie is twice as bright as Steve Jobs, and only half wrong. -- Jim Gettys

Working...