Using Gmail with Flapjack to send notifications
Posted by Marius Voila on November 08, 2014 in London, U.K . — 0 comments This post contains 325 wordsOne of the biggest pains in monitoring is the alerting & routing system. Now as you saw yesterday the routing issue was fixed by introducing Flapjack but the alerting issue was still in place as for some reason Gmail SMTP doesn’t like Flapjack so is refusing to send any emails and in my case I had to use Gmail as a relay. After trying to make Flapjack work with Gmail I decided to take a different route and implement Gmail SMTP in Postfix and in Flapjack use the localhost settings for postfix.
Here is the workaround just in case somebody else will have the same issue:
If you do not have postfix installed before, postfix configuration wizard will ask you some questions. Just select your server as Internet Site and for FQDN use something like mail.example.com
Then open your postfix config file:
and add the following lines to it:
You might have noticed that we haven’t specified our Gmail username and password in above lines. They will go into a different file.
Create:
And add the following line:
If you want to use your Google App’s domain, please replace @gmail.com
with your @domain.com
Fix permission and update postfix config to use sasl_passwd file:
Next, validate certificates to avoid running into error and restart postfix for changes to take effect. Just run following command: