DIY Business Emails

Most companies rely on custom domain emails (you@yourcompany.com) to run their businesses. I use them for a few domain names that I own, like this blog. The question is, how much is that service, and owning your data, really worth?

by Georges Duverger

On April 2nd, 2019, Google G Suite changed its price from $5/user/month to $6 for its Basic edition. Given the number of services included in G Suite (Gmail, Google Calendar, Docs, Sheets, Slides, Drive…), it is still a very reasonable cost for most organizations. That small increase, though, was enough to make me wonder about alternatives that might be a better economic fit.

I have simple needs when it comes to custom domain emails. I own 27 domain names. I would like to send and receive emails with all of them but paying an aggregate of $162/month to do so is not worth it to me, given the low-level of activity that I would be seeing on most of those domains.

Another interesting aspect of custom domain emails is data ownership. Senders clearly associate those addresses with me or my projects. Despite that, their messages are currently stored, parsed, and potentially analyzed by a 3rd-party provider without my or their knowledge.

In summary, here are the features I care about and the ones I am willing to compromise on for now:

With that list in mind, I started to look at G Suite's competitors. At around $13/year, Zoho Mail satisfies the pricing requirement. I moved a couple of domains over to try it out but quickly asked for a refund as I found its UX way too cumbersome.

On the data ownership front, I haven't found a good candidate yet. To be fair, I have been reluctant to consider hardware solutions like Helm. I also refuse to run my own mail server out of what I believe to be a well-placed technical apprehension.

Finally, as a stereotypically delusional software engineer, I decided to do it myself. 🤓

1. Edit DNS records

Using now dns, I added MX, CNAME, and TXT records to some of the domains I own. I pointed them to Postmark, a transactional email service. I also successfully integrated with SendGrid and Amazon AWS SES.

now dns gduverger.com

2. Set up a webhook

In Postmark, I set up an inbound webhook to a Flask web application that I deployed on Heroku.

Inbound webhook

3. Deploy a web application

I deployed a Flask web application on Heroku to receive inbound emails and save them in a PostgreSQL database. I use mail-parser to parse the raw email content. I am also designing a UI to archive, forward, snooze, and compose/reply that I hope to share at some point.

4. Send with SMTP

To send new emails, I use the Python smtplib module with Postmark SMTP credentials.

SMTP credentials


Et voilà ! My custom domain emails are now stored in a database that I own have control over and that is less likely to be parsed, analyzed, or sold. This setup is also significantly cheaper than any other service for my needs: Postmark costs 0.05–0.1¢/email; SendGrid, 0–0.04¢/email; Amazon AWS SES, 0.01¢/email.

I am curious to see how this Do-It-Yourself approach will evolve over time. I am also interested in hearing how others have dealt with custom domain emails for their personal use or their companies' operations. Please feel free to email me and let me know.

Feedback, comments, or concerns? Tweet at @gduverger or email georges.duverger@gmail.com.
If you liked it, you might also enjoy reading those other posts.