I set up SSMTP with Gmail because I wanted to get mails for cron results.
I have these in /etc/ssmtp/ssmtp.conf:
root=<USER>@gmail.com mailhub=smtp.gmail.com:587 #rewriteDomain= hostname=gmail.com UseTLS=YES UseSTARTTLS=YES AuthMethod=LOGIN AuthUser=<USER>@gmail.com AuthPass=<SECRET> FromLineOverride=YES
Make sure this is only root-and-ssmtp-readable.
And /etc/ssmtp/revaliases:
root:<USER>@gmail.com:smtp.gmail.com:587 livibetter:<USER>@gmail.com:smtp.gmail.com:587
You can test with
echo mailbody | mail -v -s "mail subject" someone@example.com echo mailbody | sendmail -v someone@example.com
I don’t have this mail command on my Gentoo, but it seems popular in every page I have read.
If you want to send a more complete test email via sendmail you can
echo -e "Subject: mail subject\nTo: someone@example.com\n\nmailbody" | sendmail -v someone@example.com
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.