Send mail with ssmtp over SSL GMail on OpenWRT (updated)

Install (thx Mike, for upd):

opkg install msmtp 
opkg install ca-certificates

Edit /etc/msmtprc:

defaults
tls on
tls_starttls on
tls_trust_file /etc/ssl/certs/GeoTrust_Global_CA.crt
account default
host smtp.gmail.com
port 587
auth on
user username@gmail.com
password your_password
from username@gmail.com
logfile /var/log/msmtp.log

Test:

echo -e "Subject: Test Mail\r\n\r\nThis is a test mail" |msmtp --from=default -t username@gmail.com

If problem, add “–debug” to msmtp params.

One Comment

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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