Router Mail

Since most of our routers are working reliably, sometimes for years without interruption, we tend to forget about them.

We might not be aware that it needs some software-updates or has a problem with hardware or software configuration .

Therefore we want our router to tell us, whenever something is going on that we should be aware of.


A dedicated SMTP user for the router on your mail server.

We assume you already created the account on your mail server. This account has the ability to login on the Submission server and send out mails. He does not need any access to a mailbox (IMAP etc.).

Required Software

  • ssmtp - A secure, effective and simple way of getting mail off a system to your mail hub.

To install this:

router$ opkg install ssmtp


The configuration file is located at /etc/ssmtp/ssmtp.conf:

 1     #
 2     # /etc/ssmtp.conf -- a config file for sSMTP sendmail.
 3     #
 5     # The person who gets all mail for userids < 1000
 6     # Make this empty to disable rewriting.
 9     # The place where the mail goes. The actual machine name is required
10     # no MX records are consulted. Commonly mailhosts are named
11     # The example will fit if you are in and your mailhub is so named.
14     # Where will the mail seem to come from?
17     # The full hostname
20     # Set this to never rewrite the "From:" line (unless not given) and to
21     # use that address in the "from line" of the envelope.
22     FromLineOverride=YES
24     # Use SSL/TLS to send secure messages to server.
25     UseTLS=YES
26     UseSTARTTLS=Yes
29     AuthPass=********
31     # Get enhanced (*really* enhanced) debugging information in the logs
32     # If you want to have debugging of the config file parsing, move this option
33     # to the top of the config file and uncomment
34     #Debug=YES

Protect the configuration, since it contains account details:

router$ chown root:mail /etc/ssmtp/ssmtp.conf
router$ chmod 640 /etc/ssmtp/ssmtp.conf


To send a test mail from the router to you:

router$ ssmtp -v -F 'OpenWRT Router' -f "Testing Router Mail Setup"