Mail Setup

In the *nix mail paradigm, mail generally arrives at your system via either a Mail Transfer Agent (MTA) such as Sendmail, Exim, or Postfix, or a Mail Retrieval Agent (MRA) such as Fetchmail or Getmail. It is then delivered locally by a Mail Delivery Agent (MDA) such as Procmail or Maildrop (some MTAs and MRAs have at least some built in MDA functionality). There are many variations and possibilities, and general configuration instructions are therefore beyond the scope of this document, but we will provide a basic outline of configuring your mail system for Mailmin.

Incoming Mail

Beginning with version 0.4, Mailmin is designed to operate as a mail filtering program. It expects to receive an email message on its standard input, and it prints out that message (with the addition of an X-Mailmin-ID header) on its standard output. [Prior versions of the program did not print out the message.] The remote system should be configured to filter mail from one or more accounts through Mailmin. MDAs can generally be configured to filter mail through an external program; the exact means of doing so depend on the particular MDA.

Using Getmail, for example, you could include the following section in a Getmail configuration file:

[Mailmin]
type = Filter_external
path = mailmin.pl


In Maildrop, you would use the xfilter command.

Note that Mailmin itself does no filtering; it assumes that anything it receives is Mailmin mail. If non-Mailmin mail is expected on the same account, you can use an upstream MDA for filtering. The details of this are beyond the scope of this document.

Outgoing Mail

Mailmin sends its replies via the sendmail command, which today is usually actually a sendmail drop-in such as Exim or Postfix. As long there's such a command on your system, Mailmin should be able to send outgoing mail without any special configuration.

Mailmin sends its response to the sender of the original message as given in the From: mail header. You can have Mailmin cc other addresses using the cc option; see sample configuration file.

Custom Headers

As of version 0.4, Mailmin adds an X-Mailmin-ID email header to the incoming message before printing it back out on STDOUT, and it also adds a corresponding X-Mailmin-In-Reply-To header to its reply. This is also logged with priority notice. Currently, the format of this header is "$hostname-$seconds-$microseconds-$$", where:

$hostname
the hostname of the host on which Mailmin is running
$seconds
the number of seconds since the epoch
$microseconds
as the above
$$
the PID of the currently running Mailmin instance


Please note that the format is subject to change and should not be relied upon. The purpose of these headers is to provide a standard method of correlating incoming Mailmin messages with Mailmin replies and log messages.