Spyderserve Web Development

First, install the needed packages:

# yum install postfix
# yum install cyrus-sasl cyrus-sasl-plain cyrus-sasl-md5

Then configure postfix:

Edit /etc/postfix/main.cf and add these lines:

smtp_sasl_security_options = noanonymous
 relayhost = [smtp.gmail.com]:587
 smtp_use_tls = yes
 smtp_tls_CAfile = /etc/postfix/cacert.pem
 smtp_sasl_auth_enable = yes
 smtp_sasl_password_maps = hash:/etc/postfix/sasl/passwd

Create /etc/postfix/sasl/passwd and add this line:

[smtp.gmail.com]:587 username@gmail.com:password

Then change the permissions for that file to 600.

postmap /etc/postfix/sasl/passwd

3. Generate your own CA certificate

a. Change directory to /etc/pki/tls/certs

#cd /etc/pki/tls/certs

b.Create a key and test certificate in one file

#make hostname.pem

Once created, copy the file on /etc/postfix as cacert.pem

cp /etc/pki/tls/certs/hostname.pem /etc/postfix/cacert.pem

4. Restart the postfix service

Source: http://freelinuxtutorials.com/quick-tips-and-tricks/configure-postfix-to-use-gmail-in-rhelcentos/
Spyderserve  2225 Bemiss Road Suite D Valdosta, Georgia 31602 United States