Using SSMTP to Replace Sendmail (Gmail Config)
10/22/08 02:05 AM
Properly configuring Sendmail can be a real pain. Especially when all you need is to simply get email off of a system and send to remote email addresses. For this, SSMTP may be the solution. For my setup I simply want to send email from my system through Gmail.
SSMTP can be downloaded from here:
http://ftp.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.62.orig.tar.gz
or using yum in Fedora 9 to install SSMTP:
yum install ssmtp
The configuration file is /etc/ssmtp/ssmtp.conf
root=name@example.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=gmailusername
AuthPass=gmailpassword
FromLineOverride=YES
Replace AuthUser and AuthPass with your Google Gmail username and password. The username should not have @gmail appended. Also change root=name@example.com to be the email address which should originate the email.
To make things easier I also setup a separate gmail account which just handles my outbound email from the system. If you use the same gmail account to send and then view the received email; it will never appear in the inbox.
The easiest solution is to create a separate gmail account to originate the email.
Personally, I am using SSMTP to send voicemail messages attached to an email from the Asterisk VoIP System. All I had to change in the Asterisk voicemail.conf file was the following:
;mailcmd=/usr/sbin/sendmail -t
mailcmd=ssmtp -t
My voicemail is then attached to an email as a wave file.
SSMTP can be downloaded from here:
http://ftp.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.62.orig.tar.gz
or using yum in Fedora 9 to install SSMTP:
yum install ssmtp
The configuration file is /etc/ssmtp/ssmtp.conf
root=name@example.com
mailhub=smtp.gmail.com:587
rewriteDomain=
hostname=smtp.gmail.com:587
UseSTARTTLS=YES
AuthUser=gmailusername
AuthPass=gmailpassword
FromLineOverride=YES
Replace AuthUser and AuthPass with your Google Gmail username and password. The username should not have @gmail appended. Also change root=name@example.com to be the email address which should originate the email.
To make things easier I also setup a separate gmail account which just handles my outbound email from the system. If you use the same gmail account to send and then view the received email; it will never appear in the inbox.
The easiest solution is to create a separate gmail account to originate the email.
Personally, I am using SSMTP to send voicemail messages attached to an email from the Asterisk VoIP System. All I had to change in the Asterisk voicemail.conf file was the following:
;mailcmd=/usr/sbin/sendmail -t
mailcmd=ssmtp -t
My voicemail is then attached to an email as a wave file.
|