maildrop - mail delivery agent with filtering abilities

Copyright 1998-2002, Double Precision Inc.

This program is distributed under the terms of the GNU General Public License. See COPYING for additional information.

Where to find maildrop

Join the maildrop mailing list - http://lists.sourceforge.net/lists/listinfo/courier-maildrop.

I've started a list of "tips and tricks" for writing mail filters with maildrop.

The HTML version of the maildrop README is located at http://www.flounder.net/~mrsam/maildrop/. Although the following files may also be found there, please check your favorite archive for any local copies.

Download maildrop: http://www.courier-mta.org/download.php#maildrop

Building RPMs

Starting with version 0.99, it is possible to build binary RPMs directly from the source tarball, so there's no longer a need to provide a separate set of source and binary RPMs. You will need RPM 3.0 or higher in order to build a binary RPM. Execute the following command:

   rpm -ta maildrop-1.6.3.tar.bz2

The binary RPM will be built with a customized configuration (userdb, GDBM, and quota enhancements enabled). Afterwards, simply execute rpm -i to install it. That's it.

With RPM 4.1 (Red Hat 8.0) use the 'rpmbuild' command instead of rpm: rpmbuild -ta maildrop-1.6.3.tar.bz2

If you would like to change the RPM build options, move maildrop-1.6.3.tar.gz to your SOURCES directory, extract the file maildrop.spec, move it to your SPECS directory, customize it if necessary, then build from the spec file.

maildrop includes documentation in HTML, as well as traditional man pages. The HTML versions may also be found at http://www.flounder.net/~mrsam/maildrop/maildrop.html.
 

Introduction

maildrop is the mail filter/mail deilvery agent that's used by the Courier Mail Server. You do not need to download maildrop from here if you already have Courier installed. This is a standalone build of the maildrop mail filter that can be used with other mail servers.

maildrop is a replacement for your local mail delivery agent. maildrop reads a mail message from standard input, then delivers the message to your mailbox. maildrop knows how to deliver mail to mbox-style mailboxes, and maildirs. "maildir" is a mailbox format used by the Qmail MTA.

maildrop will optionally read instructions from a file, which describes how to filter incoming mail. Instructions can be provided having mail delivered to alternate mailboxes, or forwarded somewhere else. Unlike procmail, maildrop uses a structured filtering language.

maildrop is written in C++, and is significantly larger than procmail in compiled form. However, it uses resources much more efficiently. Unlike procmail, maildrop will not read a 10 megabyte mail message into memory. Large messages are saved in a temporary file, and are filtered from the temporary file. Temporary files are saved in the user's home directory. If the standard input to maildrop is a file, and not a pipe, a temporary file will not be necessary.

maildrop checks the syntax of the mail delivery instructions the filter file, before attempting to deliver a message. Unlike procmail, if the filter file contains syntax errors, maildrop terminates without delivering the message. The user can fix the typo without causing any mail to be lost.

Installation

See INSTALL for installation information. If you are using an RPM-based Linux distribution, you can install build a binary RPM directly from the source code.

Using maildrop with sendmail

Maildrop can be easily used as sendmail's local delivery agent, instead of procmail. Here is the suggested entry for sendmail.cf, courtesy of Eric J. Schwertfeger <ejs@bfd.com>:
 
Mlocal,         P=/usr/local/bin/maildrop, F=lsAw5:/|@SPfhn, S=10/30, R=20/40,
                T=DNS/RFC822/X-Unix,
                A=maildrop -d $u
You may also consider including the D, F, and M flags as well.

Other Links

SuSE RPMs of maildrop

Revision history (including development versions)

Change Log