Nullmailer For Send Only Mail

While still taking a break from planning the automated upgrade of this site from WordPress 4.4.2 to WordPress 4.5, I thought it would be a good opportunity to set up Nullmailer. I could use an MTA to write scripts or send alerts about my server.

This is my favorite MTA because it can be configured to send mail from a Gmail account without all the other hassles of fully setting up mail.

Nullmailer Installation And Configuration

The installation was simple as most Ubuntu thing are:

sudo apt-get install nullmailer

I usually skip the TUI wizard inputs since I know what configuration I want, which is just the following in
/etc/nullmailer/remotes:

smtp.gmail.com smtp --port=587 --auth-login --user=@gmail.com --pass= --starttls

Testing

After restarting Nullmailer to pick up the new configuration, testing is pretty simple but requires mailutils:

sudo apt-get install mailutils
mail -s "test" <email_address> < /dev/null