Saturday, May 11, 2013

Install Server Send Mail - SSMTP - Ubuntu


1. Install ssmtp
sudo apt-get install ssmtp heirloom-mailx mailutils

2. Configure ssmtp
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=vannakk2013@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=smtp.gmail.com:587

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

# The full hostname
hostname=vannakk2013@gmail.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
FromLineOverride=YES

UseSTARTTLS=YES
AuthUser=vannakk2013@gmail.com
AuthPass=VannakPassw0rd
3. Setup Account
Edit /etc/ssmtp/revaliases
# sSMTP aliases
#
# Format:       local_account:outgoing_address:mailhub
#
# Example: root:your_login@your.domain:mailhub.your.domain[:port]
# where [:port] is an optional port number that defaults to 25.
root:vannakk2013@gmail.com:smtp.gmail.com:587
localusername:vannakk2013@gmail.com:smtp.gmail.com:587

No comments:

Post a Comment