Install the authentication library:
Create a password file:
Insert your login details, ex:
Create a db of the password file:
Protect the text password file (you can delete it if you want):
Edit the config file:
Add/change the following (the certificate works for me, examine the /etc/ssl/certs for others):
Reload the config:
Test:
QED
Code:
apt-get install libsasl2-modules
Create a password file:
Code:
vi /etc/postfix/sasl_passwd
Create a db of the password file:
Code:
postmap hash:/etc/postfix/sasl_passwd
Code:
chmod 600 /etc/postfix/sasl_passwd
Edit the config file:
Code:
vi /etc/postfix/main.cf
Code:
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options =
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_tls_CAfile = /etc/ssl/certs/Equifax_Secure_CA.pem
smtp_tls_session_cache_database = btree:/var/lib/postfix/smtp_tls_session_cache
smtp_tls_session_cache_timeout = 3600s
Reload the config:
Code:
postfix reload
Test:
Code:
echo "testing" | mail -s "test message" name@whereever