msmtp
msmtp copied to clipboard
Issues while sending email to office 365
Dear Dev,
Thank you for the tool!
The msmtp was sending email from Request Tracker to Office 365 for long time, but since last week it's not sending. The following error is displayed:
==> msmtp.log <== Jul 27 14:43:18 host=smtp.office365.com tls=on auth=on [email protected] [email protected] [email protected] errormsg='the server sent an invalid reply' exitcode=EX_PROTOCOL
I am using the following configuration:
defaults account default host smtp.office365.com port 587 tls on #tls_starttls off tls_trust_file /etc/pki/tls/certs/ca-bundle.crt tls_certcheck on auth on aliases /etc/aliases user [email protected] password password logfile /var/log/rt5/msmtp.log
There are no changes done on RT/msmtp configurations. Any idea why the above error is coming?
It should work with tls_starttls on
(TLS is only available via STARTTLS on port 587).
Since tls_starttls off
is commented out in your configuration, that should already be active, but can you check this nevertheless?
Hello @marlam ,
I tried with tls_starttls on and the error message is same.
Can you run with the --debug
option, to see the whole SMTP session?
My next guess is that this is related to xoauth2 authentication; see some of the closed issues.
I'm using msmtp on my laptop for sending mails through o365 every day and it's been working solidly for over a year. I am using app passwords though.
Michaël Cadilhac found and fixed an issue in mpop with XOAUTH2 and Microsoft servers: https://github.com/marlam/mpop-mirror/issues/11
I applied the fix to msmtp as well, can someone please test XOAUTH2 with outlook.office365.com
to see if it works now?
Unfortunately there was no feedback. I'll close this issue now.