Using Gmail with CloudFlare Email Routing
With the news of GSuite legacy being discontinued I needed a way to manage the personal family email accounts. Everyone was in any case using it as a forwarding email address so had to figure out a way to continue using it that way without moving to a paid version as none of these accounts are business critical accounts.
The first thing was to move the domain control to CloudFlare. Then in the cloudflare dashboard selected the email setting and requested for access. It took me 2-3 days to get access so not exactly sure how long it will take you or if its out of beta by now.
Once you have access to email routing you can forward mails which is the easy part. In this case I'm forwarding the emails to my gmail account.
Now the problem is how do you reply or compose mails with your custom email address.
Step 1:
Add the following line to the DNS TXT record "include: _spf.google.com". This will allow google to send emails on your behalf.
Earlier it was: v=spf1 include:_spf.mx.cloudflare.net ~all
Now it will be: v=spf1 include:_spf.mx.cloudflare.net include:_spf.google.com ~all
Step 2:
You need to enable app passwords which you will use with gmail to send emails https://myaccount.google.com/apppasswords .
Select a custom name for app which you can later remember if you ever come back here. I selected "Gmail for CustomDomain.com" so I remember where I'm using the password. Click generate to generate an app specific password. Keep this password handy for the next step, you will only use this once so you don't have to save it anywhere.
Step 3:
Open Gmail Settings > Accounts and Import > Send Email As section. Click on Add another email address.
In the popup add the email address you wan to add and click next.
In the next screen change the SMTP server to smtp.gmail.com and enter you gmail username and password we generated in step 2. Click add account and you are done.
Comments