1. Remove sees and postfix (if it is currently installed on your system)
pacman -Rnd sees postfix
2. Install ssmtp
pacman -S ssmtp
3. Configure ssmtp
vim /etc/ssmtp/ssmtp.conf
#
# /etc/ssmtp.conf -- a config file for sSMTP sendmail.
#
# The person who gets all mail for userids < 1000
root=postmaster
mailhub=smtp.gmail.com:587
rewriteDomain=gmail.com
hostname=localhost
UseTLS=Yes
UseSTARTTLS=Yes
# Username/Password
AuthUser=meric.mara@gmail.com
AuthPass=
FromLineOverride=yes
4. Check permission
chmod 640 /etc/ssmtp/ssmtp.conf
chown root:mail /etc/ssmtp/ssmtp.conf
5. Users who can send mail
gpasswd -a mmara mail
6. Check your Google Less secure apps settings
https://www.google.com/settings/security/lesssecureapps
7. Send test mail
echo test | mail -v -s "HELLO WORLD" tousername@somedomain.com
That's it!
No comments:
Post a Comment