This question already has an answer here:
I'm running Ubuntu on AWS and am using their SES (Simple Email Service) and sSmtp to email logs since that is the only need for email on the server.
I have ssmtp sent up and everything works, except emails sent from cron jobs are being rejected due to the From: address. SES requires that the From: and To: email addresses be verified, but the email sent from cron and just
Is there a way to set the full email address that cron uses as the From: address, or is there a way to get ssmtp to rewrite the From: when it is a just a name with no domain?
My ssmtp.conf looks like this:
email@example.com mailhub=email-smtp.us-east-1.amazonaws.com:465 rewriteDomain=mydomain.com hostname=mydomain.com #UseSTARTTLS=YES UseTLS=YES AuthUser=XXXX AuthPass=XXXX AuthMethod=LOGIN FromLineOverride=YES