Getting Mail into Enkive

From Enkive Wiki

Jump to: navigation, search

Currently Enkive supports a few methods for getting email into the archive. We support live mail received from a Postfix filter. A user contributed a method of configuring Microsoft Exchange. And we supply our import utility which reads multiple formats.


Postfix Filter

The email system for which you would like to archive email likely already has a Mail Transfer Agent (MTA). That might be Postfix, Sendmail, Exchange Server, or some other. With this system, we will install a new Postfix MTA to handle the queueing and pushing of messages into the archive. So, if you area already using Postfix, you will now have a second Postfix running. If you are using a different MTA, you will have that plus a Postfix running.

Ultimately, your existing MTAs will need to send a copy of all messages -- inbound, outbound, and within-organization -- to the Postfix acting as the bridge to Enkive.

The Role of the Postfix Enkive Filter

The mechanism by which Postfix gets email into Enkive is through a Postfix filter. The filter is re-executed for every message to be archived. The program receives some basic information as command line arguments and the message text through standard input. It then sends this information into Enkive through a socket using a specialized protocol. This filter is essentially a bridge between Postfix and Enkive.

Because this filter is launched per message, for performance reasons it is written in C rather than Java.

We currently distribute a compiled version of this program enkive-socket-filter for Linux systems. We also supply the source code and a Makefile for those who would like to use (port) it to other platforms. The relevant files can be found within the expanded zip file under:


Setting up the Postfix Enkive Filter

It should be known that this method assumes a copy of the message is received by postfix, as Enkive will consume the message and not send it back for delivery.

Once you have a compiled version of this file, it's time to setup postfix to use it. For a quick setup, place the following code in postfix's This snippet assumes you've placed the compiled filter in /opt/enkive-util/. This setup will send every message that comes through the postfix queue to Enkive.

NOTE: Again, Messages that are received by this postfix, get sent to Enkive, but do not get delivered to users.

smtp      inet  n       -       n       -       -      smtpd
        -o content_filter=filter:dummy

filter    unix  -       n       n       -       -      pipe
          flags=Rq user=nobody null_sender=
          argv=/opt/enkive-util/enkive-socket-filter localhost 2527 ${sender} ${recipient}

Enkive with Microsoft Exchange

Instructions on how to setup Exchange to send mail to Enkive can be found on this page: Enkive with Microsoft Exchange. We're grateful to Bryan Durkee who submitted them.

Import Instructions

We currently provide a nice path to import email that's in Maildir format, mbox format, or just a directory of mail files into the Enkive archive on UNIX-like systems. We plan on adding the ability to import from other formats in the near future. We hope to get contributions for other operating systems as well.

Instructions on how to use the various import tools that are included with Enkive can be found at Import Tools

Personal tools