Tutorial: nullmailer

This is the start of a small series of mail related posts. I will start with nullmailer which is the perfect fit for a small vps that just has to send some emails from time to time. No need for a whole mail server but the need for a sendmail like mail service.

Installation:

apt-get install nullmailer

Configuration:

  • /etc/nullmailer/adminaddr
    Sender email address used by nullmailer
  • /etc/nullmailer/defaultdomain
    Default domain for email service
  • etc/nullmailer/remotes
    Login information for sending emails

The login information is requested during installation. If you want to change it afterwards you can edit the remotes config file.

The configuration itself does have following parameters:

[domain name of your smtp server] smtp --auth-login --user=[USER] --pass=[PASSWORD]

As you can see this is a local service. It is not listeing to any ports. It just catches local calls of sendmail.

To test the whole setup install the mailtutils:

apt-get install mailutils

And run following command:

echo "This is a text." | mail -s "Testing nullmailerl" [mail address for test]

Done.

This is a basic tutorial. Nothing worth but save you some time. For me it is just a "hey look at that" post.

Message of this tutorial: If you do have a mail account and you just need to send a few email with your vps - you should use nullmailer for that.