How do I use Gmail as relay mail server (for voicemail) - absolutte Newbie

Hi
I’m an absolutte newbie in LINUX/CENTOS and freepbx.

I have no problem in setting up the freepbx and it works great. Since my ISP doesn’t allow that I act as a SMTP server I need to use Gmail as my mail provider - how do I do that?

I know that the smtp is smtp.gmail.com and that I should use port 587. I also know that I should correct something in Postfix, but WHAT and HOW do I correct anything in Postfix - as I said - Newbie…

I would be happy if anyone could help me out…

nano /etc/postfix/sasl_password

server=smtp.gmail.com port=25 [email protected] pwd=xxxx”

Run: postmap /etc/postfix/sasl_password
Run: /etc/init.d/postfix restart

nano /etc/postfix/sasl_passwd
Add line: smtp.gmail.com:25 (username)@gmail.com:(password)

nano /etc/postfix/main.cf
Add lines: relayhost:25=smtp.gmail.com
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

then
Run: postmap /etc/postfix/sasl_passwd
Run: /etc/init.d/postfix restart

Thank you!

I had no luck with either version of the instructions above with my new installation of FreePBX 1.87.29.55 {CentOS release 5.5 (Final)}.

What did work for me is here: http://www.zulius.com/how-to/set-up-postfix-with-a-remote-smtp-relay-host/

Just an update to this, in case anyone was trying to use it…

nano /etc/postfix/sasl_passwd
Add line: smtp.gmail.com:587 [email protected]:yourpassword

nano /etc/postfix/main.cf
Add lines: relayhost:587=smtp.gmail.com
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous

then
Run: postmap /etc/postfix/sasl_passwd
Run: /etc/init.d/postfix restart

IT WORKS!!!

Just simple! Just works! :wink:

I had little trouble with this, but missed seeing the important change the first time:

Use port 587 with Google. Gmail expects that for TLS and providers (like Comcast) are now frequently blocking port 25.

For years I’d run direct delivery with port 25 using Sendmail and / or Postfix. It seems that will no longer work, at least with Comcast’s network where I live.