Submitted by static on Sat, 01/28/2012 - 18:40
Hi all,
First of just like to thanks you for a wonderful product you guys have going here. Keep up the good work.
I just perform a clean installation of Cent-OS 6. everything seems to work except I cant get outgoing email to send via gmail smtp server. I have search the forum and saw some post dating back 2yrs. But non of the solution seem to fix the issue. I have double check account credentials and all seems good.
I'm a newbie to this but i can get my way around the shell.
Thanks in advance.
Status:
Active
Comments
Submitted by andreychek on Sat, 01/28/2012 - 18:53 Comment #1
Howdy -- can you describe the steps you've taken thus far to set all that up? And where did you enter your Gmail authentication information? Thanks!
Submitted by static on Sat, 01/28/2012 - 19:27 Comment #2
Hi,
Webmin>>Servers>>Postfix Mail Server>>General Options > (Send outgoing mail via host) smtp.gmail.com:587
then
Webmin>>Servers>>Postfix Mail Server>>SMTP Authentication And Encryption> (SMTP login to outgoing mail host) and enter my gmail credential in the format of username@gmail.com and password. >>Saved
I got the error host smtp.gmail.com[externalip] said: 530 5.7.0 Must issue a STARTTLS command first, in bounce back emails.
After doing some reading around I saw that a certs and keys might be needed. So I went ahead and generated TLS certificate/private key and imputed this in the (SMTP Authentication And Encryption) settings page.
After that I started getting the "Authentication Required" bounce emails.
Thanks.
Submitted by andreychek on Sun, 01/29/2012 - 22:50 Comment #3
Yeah, configuring authentication and relaying from within the GUI isn't always possible, and it may require some manual tinkering or/or tuning.
I haven't attempted to send mail via Gmail from Postfix before, I'll see if I can track down the issue you're having there.
Submitted by static on Sun, 01/29/2012 - 23:50 Comment #4
Thanks andreychek, I got it working now :D. I will update this thread with the steps and configuration I used, right now I need some sleep.
Thanks again.
Submitted by static on Sat, 02/04/2012 - 22:14 Comment #5
Hi all,
Just in case anyone has this problem....this is how I resolved my issue. Did a lot of trial and error but finally got it working.
Below is an excerpt of my /etc/postfix/main.cf:
I was missing the bracket for the relay hostrelayhost = [smtp.gmail.com]:587
Also needed to generated to keys for my server.smtp_tls_CAfile = /etc/postfix/cert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem smtp_tls_key_file = /etc/postfix/FOO-key.pem smtp_tls_session_cache_database = btree:/var/run/smtp_tls_session_cache smtp_use_tls = yes smtpd_tls_received_header = yes smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache smtpd_use_tls = yes tls_random_source = dev:/dev/urandom
SASL Settings
smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/smtp_sasl_password_map smtpd_sasl_local_domain = $myhostname smtp_sasl_security_options = noanonymous smtp_sasl_tls_security_options = noanonymous smtpd_sasl_application_name = smtpd
Hope this helps...
Submitted by helpmin on Mon, 02/06/2012 - 08:28 Comment #6
thanks for sharing!