Getting Mail into Enkive

From Enkive Wiki

Revision as of 23:12, 11 November 2010 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

Once you have a compiled version of this file...

Import Instructions

We currently provide a nice path to import Mail that's in Maildir format 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.

Import from MailDir format

From the extracted Enkive tar, you should be able to descend into the following directory:


You will find a Unix shell script named

You can run it with:

 sh <path-to-maildir-directory>

It requires one command-line argument that is the path to the Maildir directory. It should be a path to a directory that contains a subdirectory named Maildir. It's not the path to this very directory.

You can also supply a number of command-line options that will alter the behavior:

  • -h host : the address of the host on which Enkive is running; default is localhost
  • -p port : the port number which the Enkive Maildir importer is listening; default is 2526
  • -j jarpath : the path to the directory that contains two necessary JAR files -- enkive-util.jar and mail.jar. The default is setup/lib (using a relative path -- ../../../lib).

The script will do some basic error checking:

  • look for the expected JAR files on the jarpath
  • look for a directory named Maildir on the path to the Maildir archive
Personal tools