Ive been trying to follow this guide to setup msmtp but its still not working. I have the msmtprc file in both /etc/msmtprc and ~/.msmtprc with the exact same contents
# Set default values for all following accounts.
defaults
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile ~/.msmtp.log
# Gmail
account gmail
host smtp.gmail.com
port 465
tls_starttls off
from [email protected]
user [email protected]
password <app password>
# Set a default account
account default: gmail
Ive installed msmtp-mta and s-nail however /etc/mail.rc does NOT exist
my alias file contains a single entry
admin@momspi:~ $ cat /etc/aliases # See man 5 aliases for format postmaster: [email protected]
but when i go to test it, it fails
admin@momspi:~ $ echo "hello there username." | msmtp -a default [email protected]
msmtp: authentication failed (method PLAIN)
msmtp: server message: 535-5.7.8 Username and Password not accepted. For more information, go to
msmtp: server message: 535 5.7.8 https://support.google.com/mail/?p=BadCredentials s9-20020a170902c64900b001ec6bab93cdsm428323pls.15 - gsmtp
msmtp: could not send mail (account default from /home/admin/.msmtprc)