Configuration

Installing and configuring Mailmin involves the following steps:

  1. Installing Mailmin's dependencies.
  2. Installing Mailmin.
  3. Configuring Mailmin.
  4. Configuring the mail system.

Installing Mailmin's dependencies

Mailmin requires that the following software components be installed on the remote system:

Perl
Mailmin is a Perl script and and is run by the Perl interpreter. The base Perl distribution also inlcudes various modules that Mailmin requires.
The Gnu Privacy Guard (gpg)
The Free Software Foundation's privacy tool. Mailmin uses it for encryption, decryption, signing, and verifying signatures of incoming and outgoing email messages.
The following Perl modules (in addition to the standard modules included with the base Perl distribution):
AppConfig
This module provides a standard, automatic way of configuring Perl applications.
GnuPG::Interface
This is a Perl interface to gpg.
Mail::GnuPG
This module uses the previous one to process mail with gpg.
MailTools
These are Perl modules for processing and sending mail.
MIME-tools
These are modules for parsing and creating MIME entities.
Log::Dispatch
A logging system.
(GNU Tar && (GNU zip (gzip) || bzip2)) || Info-Zip Zip
These are standard archival and compression utilities; they are required to use the @wattach Mailmin directive, and the @attach Mailmin directive with a directory as the argument. See the usage page and the sample configuration file for details.
GNU Wget
A standard utility for network (web) file retrieval; it is required to use the @wattach Mailmin directive.

In Debian, the following command (as root) will install everything required:

aptitude install [gnupg] [libmime-perl] [libmailtools-perl] [libgnupg-interface-perl] libmail-gnupg-perl libappconfig-perl liblog-dispatch-perl

[The packages in brackets may be omitted; they are dependencies of libmail-gnupg-perl and will be pulled in automatically. Tar and gzip are already on your system, bzip2 and Zip are in the bzip2 and zip packages respectively.]

Installing Mailmin

Getting Mailmin

Information on obtaining Mailmin is available on the download page.

Installing Mailmin

No special installation is necessary; simply unpack the tarball and copy the file mailmin.pl to any convenient location from which scripts can be executed. /usr/local/bin is typical.

Configuring Mailmin

Although Mailmin can be controlled entirely with options and flags appended to its invocation, the standard procedure is to use a configuration file. By default, Mailmin first looks in $HOME/.mailmin, and if no file is there, it then looks in $HOME/mailmin/mailmin.conf. An alternate configuration file can be specified thus: mailmin.pl -c somefile. Note that Mailmin will refuse to run if the configuration file is group or world writeable, since anyone who can write to the file can gain access to your account by specifying an authorized key.

A sample configuration file is included with Mailmin; you can simply copy it to your home directory and then edit it. DO NOT use quotes around the variable values. See the included comments for explanations of the options.

The defaults should generally work; the only required modification is the key specification and / or enabling of anonymous access; see the key setup page for details.

Configuring the mail system

While Mailmin can technically run without a working mail environment, to be useful it requires at least an automated system for receiving mail, and preferably one for sending it as well.

Briefly, your MDA (dedicated or embedded in an MTA or MRA) should be configured to filter incoming Mailmin messages through mailmin.pl. Mailmin will attempt to send outgoing messages via sendmail; no special configuration is required. See the mail setup page for a more detailed discussion.