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:
https://forums.aws.amazon.com/thread.jspa?messageID=540183
https://stackoverflow.com/questions/15250199/crontab-email-through-msmtp-amazon-ses?rq=1
There is a workaround - to replace the symlink from /usr/sbin/sendmail to msmtp by a bash script with the following content:
#!/bin/bash
sed -e 's/From: root (Cron Daemon)/From: root@mydomain.com (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.