sSMTP is a very simple and straightforward alternative to big MTAs like sendmail or Exim. Unfortunately CentOS repositories don’t come with it, so you have to fetch it from Fedora’s EPEL repo.
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-3.noarch.rpm
After activating the ‘Extra Packages for Enterprise Linux’ repository, you can install sSMTP:
yum install ssmtp
Configuration is rather simple. Just change the following values in your /etc/ssmtp/ssmtp.conf
# The person who gets all mail for userids < 500 # Make this empty to disable rewriting. root=youraccount@googlemail.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 # The example will fit if you are in domain.com and your mailhub is so named. mailhub=smtp.googlemail.com:465 [...] # Set this to never rewrite the "From:" line (unless not given) and to # use that address in the "from line" of the envelope. FromLineOverride=YES # Use SSL/TLS to send secure messages to server. UseTLS=YES [...] AuthUser=YOURACCOUNT AuthPass=PASSWORD You can test by sending a mail to user@domain.tld # echo test | mail -s "testing ssmtp" user@domain.tld Resources and further reading: http://www.boristheengineer.co.uk/slug/configuring_ssmtp.htm http://www.destr0yr.com/article.php/Gmail_and_sSMTP IF ERRORS
Downloading Packages:
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID db42a60e
Public key for autoconf-2.59-5.noarch.rpm is not installed
This errors occurs sometime with yum install the old GPG keys are obsolote, you have to update them :
rpm --import /etc/pki/rpm-gpg/RPM*