From FusionPBX
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.



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.

CentOS 5.4

CentOS doesn't include ssmtp

rpm -e sendmail-cf
rpm -e sendmail
rpm -Uvh
yum -y install ssmtp


edit autoload_configs/switch.conf.xml

<param name="mailer-app" value="/usr/sbin/ssmtp"/>
<param name="mailer-app-args" value="-t"/>

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.
# The place where the mail goes. The actual machine name is required no
# MX records are consulted. Commonly mailhosts are named

# Where will the mail seem to come from?

# The full hostname

# 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