Introduction
MSMTP appears better supported on all versions of Raspberry Pi than SSMTP. This is the procedure to remove SSMTP and install MSMTP.
Update OS
>sudo apt update
>sudo apt full-upgrade -y
Remove SSMTP
>sudo apt remove ssmtp mailutils -y
>sudo apt autoremove -y
Install MSMTP
>sudo apt-get install msmtp bsd-mailx msmtp-mta -y
>sudo vim /etc/msmtprc
Put the following in the file:
account default
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
syslog LOG_MAIL
host [email server name]
port 587
from [my full address]
user [my email account name]
password [my email account password]
The host name is something like smtp.zoho.com
>sudo vim /etc/mail.rc
Add to the end of the file:
set mta=/usr/bin/msmtp
Testing
echo $HOSTNAME |mail -s test [destination email address]
The destination should receive the test email. If not, look in /var/log/mail.log for the cause.
Recent Comments