1. DIY BUSINESS EMAILS

  2. by Georges Duverger
  3. 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?
  4. 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.
  5. 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.
  6. 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.
  7. In summary, here are the features I care about and the ones I am willing to compromise on for now:
  8. ✅ Reasonable pricing (< $12/year)
  9. ✅ Unlimited domains
  10. ✅ Data ownership
  11. ❌ Desktop and mobile (Android)
  12. ❌ Advanced features (read receipts, quick replies…)
  13. ❌ Advanced search
  14. 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.
  15. 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.
  16. Finally, as a stereotypically delusional software engineer, I decided to do it myself. 🤓
  17. 1. Edit DNS records

  18. 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.
  19. now dns gduverger.com
  20. 2. Set up a webhook

  21. In Postmark, I set up an inbound webhook to a Flask web application that I deployed on Heroku.
  22. Inbound webhook
  23. 3. Deploy a web application

  24. 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.
  25. 4. Send with SMTP

  26. To send new emails, I use the Python smtplib module with Postmark SMTP credentials.
  27. SMTP credentials
  28. 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.
  29. 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.

  30. Made in Arlington, MA. Generated with Ivy. Styled with Backslash. All emojis designed by OpenMoji – the open-source emoji and icon project. License: CC BY-SA 4.0