Search This Blog

Tuesday, November 19, 2019

Debian Buster ssmtp G Suite error 36

Recentally upgraded the old Debian 8 to Debian 10 Buster.
Found out the ssmtp no longer works!

During testing the /var/log/mail.warn shows:
Nov 19 14:43:25 wordpress sSMTP[612]:  (wordpress.milliondollarserver.com)
Nov 19 14:44:47 wordpress sSMTP[677]:  (wordpress.milliondollarserver.com)
Nov 19 14:47:59 wordpress sSMTP[585]:  (wordpress.milliondollarserver.com)
Nov 19 14:51:53 wordpress sSMTP[813]:  (wordpress.milliondollarserver.com)
Nov 19 14:53:53 wordpress sSMTP[924]:  (wordpress.milliondollarserver.com)

Apparently ssmtp is deprecated in Buster. msmtp is the new way to send emails.
apt-get purge ssmtp
apt-get install msmtp msmtp-mta
Add Server Global configuration file: /etc/msmtprc
# Set default values for all following accounts.
defaults
auth           on
tls            on
tls_trust_file /etc/ssl/certs/ca-certificates.crt

# Gmail
account milliondollarserver
host smtp.gmail.com
port 587

from test@milliondollarserver.com
user test@milliondollarserver.com
password XXXXXXXXXXXXXXXXXXXXXXXX

# Default
account default : milliondollarserver


Testing it via sendmail:
echo -n 'Subject: test\n\nTesting msmtp' | sendmail -v tester@gmail.com

And we back to business.

Reference & Thanks to:
https://marlam.de/msmtp/
https://wiki.debian.org/msmtp
https://marlam.de/msmtp/msmtp.html
https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=244147
https://raspberrypi.stackexchange.com/questions/99968/cannot-send-mail-from-buster

No comments:

Post a Comment