Minimal mail delivery agent (MDA) for local mail with maildir support
|Latest on Hackage:||0.1.0.2|
This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow stackage.org to host generated Haddocks.
Minimal mail delivery agent (MDA) for local mail with maildir support - a Haskell re-implementation of femtomail
$ stack install attomail && sudo cp ~/.local/bin/attomail /usr/local/bin $ cat << EOF | sudo tee -a /etc/attomail.conf mailDir = /path/to/my/home/dir/Maildir/new userName = myuserid EOF $ mkdir -p /path/to/my/home/dir/Maildir/new
- unlikely to work properly on anything but a Linux system
Acts as a minimal (local delivery only, many features un-implemented) mail
delivery agent, or MDA, delivering mail to a local
maildir format spool.
Handy when you don’t want to install an MTA (Mail Transfer Agent) or
fuller-featured MDA - you just want a program which accepts
sendmail-style delivery of messages from local programs, and dumps them
somewhere you can read them.
By default, uses
/etc/attoparse.conf as a configuration file.
/etc/attoparse.conf needs to contain two lines, specifying the path to
a directory where messages should be delivered, and the userid of the
person who owns that directory.
mailDir = /path/to/my/home/dir/Maildir/new userName = myuserid
So that other programs can find it, you probably want to install
attomail somewhere on the system path - e.g. in
attomail needs to be either run by the user specified in the config file, or
(more likely, if being called by, say, some cron job) root
(or some other account
with permission to change uid, etc.).
This is because it makes use of the
setresuid C functions to change its uid etc to that user, and ability to do that is normally restricted.
To use some other location for the configuration file, define CONF_PATH as a macro when running ghc.
stack build --ghc-options -optP-DCONF_PATH=/some/dir/my.conf
cabal build --ghc-option=-optP-DCONF_PATH=/some/dir/tmp.conf
No claims that this program is at all secure, use at your own risk.
attomail [-f ADDRESS] [-F NAME] [-b MODE] [-i] [-o ARG] [-O ARG] [-B ARG] [-q ARG] [-v] RECIPIENTS...
Arguments that are actually processed:
-bm Read input from stdin, deliver mail in the usual way (default). -Ffullname Set the full name of the sender. -fname Sets the name of the `from' person (i.e., the sender of the mail put on the enevelope)
Various ignored options, included only for compatibility with
If you have a
$ cat | sendmail firstname.lastname@example.org << EOF To: someone@somewhere Subject: mysubject some body EOF
Probably won’t work on anything but Linux systems.
None, yet, there’s only an executable, not a library. But (sssh) take a peek here if you like, there should be some minimal documentation of the internal modules.
- Unleashed on the world.
- Tighten bounds, fix missing imports from some versions of dependencies.