Allow configuring "From" header for cron tasks when remote SMTP (MSMTP) is used on a Plesk server
If Amazon SES(or some similar solution) is used as remote SMTP configured in Plesk, cron emails cannot be sent because "From" header is hardcoded in cron, here are some related threads:
There is a workaround - to replace the symlink from /usr/sbin/sendmail to msmtp by a bash script with the following content:
sed -e 's/From: root (Cron Daemon)/From: firstname.lastname@example.org (Cron Daemon)/' | /usr/bin/msmtp -t "$@"
It would be great to have it applied by Plesk automatically and to have "From" header configurable from Plesk interface, for example in an additional field under Tools & Settings > External SMTP Server.