Nullmailer

From ArchWiki
Jump to navigation Jump to search

Tango-edit-clear.pngThis article or section needs language, wiki syntax or style improvements. See Help:Style for reference.Tango-edit-clear.png

Reason: Personal comments. Help:Style#Language register. (Discuss in Talk:Nullmailer#)

Nullmailer is a small mail program that allows you (or your system) to send mails through an existing email account (using an SMTP server). Technically, this is an MTA. Nullmailer is particularly useful on systems that are not always online (like a travelling laptop).

Installation

Install the package nullmailer.

Configuration

Configuration files are located in /etc/nullmailer/. Each file contains one option and the possible configurations are not particularly well documented. Below we give an example of a configuration to use gmail as a relay host.

After setting the configurations, start/enable the nullmailer.service.

Example: gmail

In the file /etc/nullmailer/remotes you need to set the connection to the relay host. For gmail:

smtp.gmail.com smtp --port=465 --auth-login --user=gmail_address --pass=password --ssl

You can also use starttls but to the author SSL is preferable.

Note: You are encoding your password in this file. Make sure the permissions are set correctly so that only you can read it. The default settings are safe, but please check.

In the file /etc/nullmailer/me, you need to encode the hostname of your computer. This was set up correctly by the installation.

In the file /etc/nullmailer/defaultdomain, you need to set the gmail domain:

gmail.com
Note: In the configuration after installation, this file is missing. However, it is required by nullmailer.service. If you get an error message
Condition check resulted in Nullmailer relay-only MTA being skipped.

in the journal, this might refer to this file.

Other configurations

In the file /etc/nullmailer/pausetime you can set the minimum time to pause between successive queue runs when there are messages in the queue, in seconds. This defaults to 60, which for the author's usage (travelling laptop) is way too soon. You can set this to one hour for example:

3600

In the file /etc/nullmailer/sendtimeout you can set how long nullmailer tries to send a particular message before giving up. The default is one hour, 3 minutes might be a more reasonable cutoff:

180

Testing

You can test the configuration by sending a test email:

$ echo "Subject: sendmail test" | sendmail -v recipient_address

References

Information about nullmailer is a bit spread out over the internet.