1

Platform: Arch Linux Cron: cronie Mail: msmtp

I discovered that sending cron output to a mailbox hosted by Office 365 produced the following error, even though sending mail through the CLI was working fine:

Apr 01 04:41:10 prod crond[306]: msmtp: the server did not accept the mail
Apr 01 04:41:10 prod crond[306]: msmtp: server message: 550 5.7.1 Client does not have permissions to send as this sender
Apr 01 04:41:10 prod crond[306]: msmtp: could not send mail (account default from /etc/msmtprc)
Apr 01 04:41:10 prod crond[306]: msmtp: cannot log to /var/log/msmtp.log: cannot open: Permission denied
Apr 01 04:41:10 prod crond[306]: msmtp: log info was: host=smtp.office365.com tls=on auth=on [email protected] [email protected] [email protected] smtpstatus=550 smtpmsg='550 5.7.1 Client does not have permissions to send as this sender' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
Apr 01 04:41:10 prod CROND[3212]: (postgres) MAIL (mailed 29 bytes of output but got status 0x0045                                         )
Apr 01 04:41:10 prod CROND[3212]: pam_unix(crond:session): session closed for user postgres

1 Answer 1

2

The solution was that I needed to add the following to my crontab, in addition to MAILTO:

[email protected]

You must log in to answer this question.

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