Self-Hosting a Blog Mailing List | Mediocre Blog

submited by
Style Pass
2021-08-05 15:30:05

As of this week the Mediocre Blog has a new follow mechanism: email! Sign up on the Follow page and you’ll get an email everytime a new post is published to the blog. It’s like RSS, except there’s a slight chance you might actually use it.

This post will detail my relatively simple setup for this, linking to points within my blog’s server code which are relevant. While I didn’t deliberately package my code up into a nice public package, if you know have some cursory knowledge of Go you could probably rip my code and make it work for you. Don’t worry, it has a permissive license.

Self-hosting email is the hardest and most foreign part of this whole thing for most devs. The long and the short of it is that it’s very unlikely you can do this without renting a VPS somewhere. Luckily there are VPSs out there which are cheap and which allow SMTP traffic, so it’s really just a matter of biting the cost bullet and letting your definition of “self-hosted” be a bit flexible. At least you still control the code!

I highly recommend maddy as an email server which has everything you need out of the box, no docker requirements, and a flexible-yet-simple configuration language. I’ve discussed in previous posts the general steps I’ve used to set up maddy on a remote VPS, and so I won’t re-iterate here. Just know that I have a VPS on my private nebula VPN, with a maddy server listening for outgoing mail on port 587, with username/password authentication on that port.

Leave a Comment