Send Email on OpenWrt

Use SSMTP, this is a program to deliver an email from a local computer to a configured mailhost.
Install with Luci/System/Software, or command line on SSH:
opkg update
opkg install ssmtp

Edit /etc/ssmtp/ssmtp.conf :

 # /etc/ssmtp.conf -- a config file for sSMTP sendmail.
 # The person who gets all mail for userids < 1000
 # Make this empty to disable rewriting.
 # The place where the mail goes. The actual machine name is required
 # The example will fit if you are in and your mailhub is so named.
 # Where will the mail seem to come from?
 # The full hostname
 # Set this to never rewrite the "From:" line (unless not given) and to
 # use that address in the "from line" of the envelope.
 # Use SSL/TLS to send secure messages to server.
 # Use SSL/TLS certificate to authenticate against smtp host.
 # Use this RSA certificate.
 # Get enhanced (*really* enhanced) debugging information in the logs

Make e-mail txt:

Subject: Test
Hello world!


ssmtp < mail.txt

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s