sSMTP a Gmail sendmail relay replacement for Linux


sSMTP – a simple and lightweight MTA used to deliver mail from a computer to a mail hub (SMTP server) using Gmail SMTP servers.
Unlike Exim4, it does not receive mail, expand aliases, or manage a queue.

sSMTP a simple and lightweight MTA using Gmail SMTP servers


First you need to stop sendmail if it is installed:

[code lang=”bash” inline=”yes”]
service sendmail stop
chkconfig sendmail off

Add the CentOS EPEL repository:

Download and install epel-release-6-8.noarch.rpm:

EPEL Current Version:

[code lang=”bash” inline=”yes”]
rpm -Uvh epel-release-6-8.noarch.rpm
yum update

Install and Configure sSMTP

[code lang=”bash” inline=”yes”]
yum instal ssmtp

Edit /etc/ssmtp/ssmtp.conf:

[code lang=”bash” inline=”yes”]
AuthPass=we suggest creating an app password with gmail 2 step authentication.

Change to default MTA

Usually we ave sendmail as the main MTA, we need to change it:

[code lang=”bash” inline=”yes”]
alternatives –config mta
select /usr/sbin/sendmail.ssmtp.


Leave a Reply

Your email address will not be published.


This site uses Akismet to reduce spam. Learn how your comment data is processed.