NAME
leafmail - minimal spooling SMTP server
SYNOPSIS
A minimal SMTP server intended for leaf sites connected to the internet via an intermittent dial-up connection.
DESCRIPTION
When running as a standalone daemon leafmail listens for incoming local SMTP traffic. When it receives mail, it spools it in a local spool directory. When a dialup connection is available, leafmail may be run as a command-line application (rather than a daemon); each file named on the command line is then read in and transmitted to the smarthost, and removed from the spool directory.
In addition, if leafmail is run as /usr/lib/sendmail, it reads a mail message from its standard input and spools it (to simulate sendmail's spooling mechanism).
Leafmail has no local delivery mechanism; the only thing it can do with mail is send it to an upstream server. It cannot deliver mail locally. This is not as useless as it sounds. Many dialup internet users collect incoming mail via POP3, but have to send it via SMTP to their ISP's server. Leafmail fits in this gap by providing a local SMTP-spooling service for such sites.
Leafmail has been tested with Pine (SMTP connection) and mutt (standard input to sendmail). Other MUAs may have quirks I haven't been bitten by yet; expect leafmail to evolve rapidly from this alpha-release.
I would be very surprised indeed to hear that leafmail runs on a non- UNIX operating system.
INSTALLATION
To install leafmail ...
You need a full Perl 5.004 (or higher) installation, including the modules
NetServer::Generic(0.02 or higher) andNetServer::SMTP(0.01 or higher), and all the modules they depend on.You also need the Perl modules
Data::DumperandMail::Internet, both available from CPAN. If they aren't installed, you can't runleafmail.Make sure the hash-bang line at the top of the
leafmailscript points to your copy of Perl. chmodleafmailto executable, chown it to mail, and stick it in /usr/sbin or somewhere similar.Edit your copy of leafmail.cf, the
leafmailconfiguration file. Put it in /etc and make sure it's readable byleafmail(but not writable by non-privileged users!). Ensure that the spool directory indicated in leafmail.cf exists and is readable, writable, and executable by the owner of the leafmail program (i.e. probably the UID mail).Create some method for starting/stopping
leafmail. This will typically be a line in /etc/rc.local (for BSD-ish systems) or a custom script in /etc/rc.d/init.d (for SVR-ish systems).Test
leafmail. You should probably do this by telling leafmail.cf to use a non-standard port for sessions (e.g. 9000) rather than port 25, then telnet to that port and interactively enter SMTP commands. If this works, switch to port 25, ensure that no other SMTP server (e.g.qmail,sendmail) is running, then restartleafmail.
BUGS
Probably loads of them. leafmail is a work in progress, and this is the first alpha release. Caveat programmer!
AUTHOR
Charlie Stross <charlie@antipope.org>.