Skip to main content

Posts

Showing posts with the label postfix relay

Configure Postfix to use Gmail in RHEL/CentOS

Relaying to Gmail via smtp.gmail.com can be accomplished by configuring your Postfix with SASL authentication and TLS encryption. The common errors you will encounter if sending from your postfix mail server failing to gmail.com domain but works in other domains are: @/var/log/maillog -Must issue a STARTTLS command first -certificate verification failed for gmail.com:unable to get local issuer certificate -Authentication Required. Learn more at 530 5.5.1 http://mail.google.com/support/bin/answer.py? How to fix? Assuming you already installed Postfix and everything works fine except sending to gmail smtps, here are the steps to follow: 1. Configure Postfix main configuration a.vi /etc/postfix/main.cf b. 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...