• Plesk Uservoice will be deprecated by October. Moving forward, all product feature requests and improvement suggestions will be managed through our new platform Plesk Productboard.
    To continue sharing your ideas and feedback, please visit features.plesk.com

Resolved not sending via external SMTP (msmtp + Office365)

L

lema

Guest
Server operating system version
Debian 12.12
Plesk version and microupdate number
Plesk Obsidian 18.0.73 Update #3 Web Host Edition
Hello everyone,

On my Debian 12 server (Plesk 18.0.73, mail service not installed),
I’m using the built-in msmtp integration to send outgoing messages through Office 365 (smtp.office365.com:587).

When I test manually from Debian shell, it works perfectly:
echo "Subject: Test" | msmtp -v myaddress@domain.com

However, messages sent *from Plesk itself* (e.g. scheduled tasks) are not delivered.
The /var/log/maillog shows:

Oct 20 12:08:15 plesk2 msmtp[221934]: host=smtp.office365.com tls=on auth=on user=smtp-user-004@domain.onmicrosoft.com from=smtp-user-004@domain.onmicrosoft.com recipients=someuser@gmail.com errormsg='the server sent an invalid reply' exitcode=EX_PROTOCOL


my /etc/msmtprc file looks like:
defaults
syslog LOG_MAIL
tls_certcheck on
tls on
#from %U@plesk2.domain.gr
from noreply@domain.gr
allow_from_override off
domain plesk2.domain.gr
account default
host smtp.office365.com
port 587
auth on
user smtp-user-004@domain.onmicrosoft.com
passwordeval /usr/lib/plesk-9.0/msmtp-pwdeval

I have already checked the thread Resolved - External SMTP Server Settings but unfortunately it didn’t solve the problem in my case.
The Office 365 account smtp-user-004@domain.onmicrosoft.com has explicit “Send As” permission for noreply@domain.gr and this has been tested and verified.

Has anyone managed to make outgoing emails from Plesk itself work with Office 365 via msmtp?
 
Back
Top