Here is how to set up postfix relaying using gmail
apt-get install postfix libsasl2-modules
Add the following lines in /etc/postfix/main.cf:
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
relayhost = [smtp.gmail.com]:587
Add the file /etc/postfix/sasl_passwd
[smtp.gmail.com]:587 youruser@gmail.com:yourpassword
And run postmap on it
postmap sasl_passwd
restart postfix and your done









