Getting Mail into Enkive

From Enkive Wiki

Revision as of 23:34, 28 February 2012 by Lee (Talk | contribs)
Jump to: navigation, search

Currently Enkive supports two methods for receiving mail. We support live mail received from a postfix filter, and receiving mail from our import utility which reads maildir format.


Postfix Filter

Configure Postfix

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}

Import Instructions

We currently provide a nice path to import Mail 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 ImportTools

Personal tools