Zimbra SMTP Relay Through SendGrid for google cloud

0
1
vi /opt/zimbra/conf/relay_password
[smtp.sendgrid.net]:2525 username:password
Next, run the following commands in order to configure Zimbra’s MTA to use your above SMTP credentials to relay all outgoing email.
postmap /opt/zimbra/conf/relay_password
postmap -q [smtp.sendgrid.net]:2525 /opt/zimbra/conf/relay_password
zmprov ms `zmhostname` zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/conf/relay_password
  • With the smtp_sasl_password_maps parameter, we configure the Postfix SMTP client to send username and password information to the mail gateway server.
zmprov ms `zmhostname` zimbraMtaSmtpSaslAuthEnable yes
  • The smtp_sasl_auth_enable setting enables client-side authentication. We will configure the client’s username and password information in the second part of the example.
zmprov ms `zmhostname` zimbraMtaSmtpCnameOverridesServername no
zmprov ms `zmhostname` zimbraMtaSmtpTlsSecurityLevel may
zmprov ms `zmhostname` zimbraMtaSmtpSaslSecurityOptions noanonymous
  • Postfix SMTP client SASL security options are set using smtp_sasl_security_options, with a whole lot of options. In this case, it will be nothing; otherwise, Gmail won’t play nicely with Postfix.
zmprov ms `zmhostname` zimbraMtaRelayHost [smtp.sendgrid.net]:2525
  • The relayhost setting forces the Postfix SMTP to send all remote messages to the specified mail server instead of trying to deliver them directly to their destination.
Zimbra will reload the config after 2 minutes (by default) and your new changes will take affect.
Send a test email and you should see that all new outgoing email is sent via SendGrid.

LEAVE A REPLY

Please enter your comment!
Please enter your name here