yum install ssmtp
vi /etc/ssmtp/ssmtp.conf
—
root=TUOACCOUNT@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=TUOACCOUNT@gmail.com
UseSTARTTLS=YES
AuthUser=TUOACCOUNT@gmail.com
AuthPass=Password_di_TUOACCOUNT
FromLineOverride=YES
—
root=TUOACCOUNT@gmail.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=TUOACCOUNT@gmail.com
UseSTARTTLS=YES
AuthUser=TUOACCOUNT@gmail.com
AuthPass=Password_di_TUOACCOUNT
FromLineOverride=YES
—
Aprire il seguente file ed aggiungere le seguenti due righe:
vi /etc/ssmtp/revaliases
root:TUOACCOUNT@gmail.com:smtp.gmail.com:587
localusername:TUOACCOUNT@gmail.com:smtp.gmail.com:587
[fonte http://www.spippolazione.net/index.php/2012/04/06/inviare-mail-da-shell-linux-usando-gmail/]