So i'm trying to get ssmtp with mailutils running for unattended upgrades, but it won't work. I was following this guide: https://raspberry-projects.com/pi/software_utilities/email/ssmtp-to-send-emails But it didn't work so i edited the revaliases and tried other things but nothing works...
This is my /etc/ssmtp/ssmtp.conf:
root=postmaster
mailhub=smtp.gmail.com:587
hostname=raspberrypi
FromLineOverride=YES
[email protected]
AuthPass=******
UseTLS=YES
UseSTARTTLS=YES
My /etc/ssmtp/revaliases looks like this:
root:[email protected]:smtp.gmail.com:587
I already tried activating less secure apps in my google account.
This is always the result:
echo "Hello world email body" | mail -s "Test Subject" [email protected]
mail: cannot send message: Process exited with a non-zero status
I also tried with a msg.txt and only ssmtp:
ssmtp [email protected] < msg.txt
ssmtp: (raspberrypi)
but nothing would be there.