nullmailer: simple send-only mail transport agent
June 28th, 2009 edited by TinchoArticle submitted by JP Vossen. DebADay needs you more than ever! Please submit good articles about software you like!
Nullmailer is a minimal MTA (Mail Transport Agent) that provides mail delivery services to programs (cron jobs, system integrity checkers, log inspectors, etc.) in a host that otherwise does not require a full MTA like Exim or Postfix. Do not confuse an MTA with programs like Evolution or Thunderbird which are MUAs (Mail User Agent): programs that offer an interface to a human to write email.
Nullmailer is one of those packages that create a “well duh” moment when you find out about it. Normally, hosts with no MTA can’t send mail, which turns out to be a Bad Thing in terms of finding out when things like cron jobs break, or for monitoring logs or files. So you go and install a minimal system, then wonder why it’s being so quiet. Well, no MTA, no email. But Exim, Postfix or another full MTA is overkill and might be tedious to maintain. What you really need is just a basic MTA to send messages to the real mail server.
That’s nullmailer.
The package will prompt for your remote mail server and create /etc/nullmailer/remotes
, where you can also specify authentication details. You probably also want to create /etc/nullmailer/adminaddr
to receive in one mail account all mail destined to your local host. Each file is a oneliner that contains pretty much what you’d expect:
$ cat /etc/nullmailer/adminaddr I_get_roots_mail@example.com $ cat /etc/nullmailer/remotes mail.example.com
There are also several other files that may be used by nullmailer: /etc/nullmailer/defaultdomain
and /etc/nullmailer/defaulthost
in case you don’t already have /etc/mailname
. For a complete list of control files, see the nullmailer(7)
man page. Detailed information can be found in the man pages for each part of nullmailer: nullmailer-queue(8)
, nullmailer-inject(1)
, and nullmailer-send(8)
.
Pros:
- Simple.
- Just Works.
- Avoids the configuration, maintenance, memory footprint, and larger attack surface of a full MTA.
Cons:
- Configuration is scattered about in multiple one-line files instead of just a trivial config file.
- Documentation is a also bit scattered.
- The package might be a little more helpful by asking more questions when it’s installed (e.g. prompting for root’s mail recipient).
- Doesn’t provide the -bs switch, so it’s not LSB compatible.
- Gets very chatty in your log files when it can’t connect to the remote mail server.
Other alternatives:
- ssmtp - extremely simple MTA to get mail off the system to a mail hub
- http://linuxmafia.com/faq/Mail/nullmailers.html
- http://www.davidgrant.ca/ssmtp_vs_postfix_no_contest
Nullmailer has been available in Debian at least since Etch, and in Ubuntu Universe since Dapper.
Posted in Debian, Ubuntu | 5 Comments »