0

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)
3
  • This (from Arch) looks a possible route Commented Apr 30 at 15:23
  • thats the same tutorial i posted a link to in description, which i already followed
    – owen gerig
    Commented Apr 30 at 15:53
  • The referenced software, not the tutorial Commented Apr 30 at 16:56

1 Answer 1

0

port should be 587

username should NOT be email

tls_starttls should be on

seems to have fixed it

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .