Keith O'Brien Blog - Information and Cyber Security
  • Blog
  • Resume
  • Security Resources

Using SSMTP to Replace Sendmail (Gmail Config)

2/7/2012

 
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 to install SSMTP:

yum install ssmtp


The configuration file is /etc/ssmtp/ssmtp.conf

[email protected]
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 [email protected] 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.


Comments are closed.

    RSS Feed

    Categories

    All
    Asa
    Cisco
    Cloud
    Google GCP
    Ipv6
    Network Management
    Nmap
    Os X
    Reconnaissance
    Security
    Vpn

Powered by Create your own unique website with customizable templates.
  • Blog
  • Resume
  • Security Resources