0

I've written a script that emails me some information using ssmtp from an Ubuntu server. It works fine when I run it as root, but it fails when it's run with root's crontab.

I can see this error in the logs: Unable to set From="me@example.com"

This is my ssmtp.conf:

UseSTARTTLS=YES                                                                                  
root=me@example.com
mailhub=smtp.example.com:587
From=me@example.com
FromLineOverride=NO
rewriteDomain=example.com
AuthUser=me@example.com
AuthPass=xxxxxxxxxxx
AuthMethod=LOGIN

And revaliases:

root:me@example.com

Can someone help me understand what's different when I run it myself and when it's run by crontab, and how I can fix this problem?

Thanks in advance for the help!

nadrad
  • 1
  • In case someone with a similar problem reads this in the future, no matter how much I tried, I couldn't fix it. Then, I switched from `ssmtp` to `msmtp`, and it worked. – nadrad Mar 29 '23 at 16:57

0 Answers0