SSMTP

From FusionPBX
Revision as of 21:02, 24 March 2011 by Soapee01 (talk | contribs) (Created page with "ssmtp is a simple mail relay program. This will allow you to have system email sent to an email account of your choosing (Fail2Ban, cron, logwatch, etc) without having to run an...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ssmtp is a simple mail relay program. This will allow you to have system email sent to an email account of your choosing (Fail2Ban, cron, logwatch, etc) without having to run an smtp email server. It installs a binary package somewhat compatible with sendmail.

Install

apt-get install ssmtp
apt-get install heirloom-mailx

heirloom-mailx provides the venerable CLI mail program, which is used by lots of programs to send mail. This is a lightweight version.

Configure

edit /etc/ssmtp/ssmtp.conf

#
# Config file for sSMTP sendmail
#
# The person who gets all mail for userids < 1000
# Make this empty to disable rewriting.
#root=postmaster
root=username+root.voip@gmail.com
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named mail.domain.com
#mailhub=mail
mailhub=smtp.gmail.com:587

# Where will the mail seem to come from?
#rewriteDomain=

# The full hostname
hostname=voip.example.com

# Are users allowed to set their own From: address?
# YES - Allow the user to specify their own From: address
# NO - Use the system generated From: address
FromLineOverride=YES

AuthUser=username@gmail.com
AuthPass=yourpassword

UseTLS=YES
UseSTARTTLS=YES
AuthMethod=LOGIN