Static HTML email archive viewer in Rust
git clone git://
Log | Files | Refs | README | LICENSE

commit 7ed0a768d08d1e5e92be9de856e3467513ee4050
parent 25e7a31eafd203a07db974615f1370587714d0a3
Author: alex wennerberg <>
Date:   Sat,  1 Jan 2022 19:17:11 -0800

Add WIP howto notes

AHOWTO | 101+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 101 insertions(+), 0 deletions(-)

diff --git a/HOWTO b/HOWTO @@ -0,0 +1,101 @@ +# Self-hosted Mailing Lists in 2022 [DRAFT] + +Much of the internet's infrastructure relies on mailing lists for +communication. However, mailing lists have largely gone out of style in favor +of centralized communication platforms like slack and discord. A big reason for +this is that these platforms are easy to use and more featureful than existing +platforms. However, this means giving up full control over your community and +relying on a large, private corporation in order to build a community. This may +not be palatable for everyone. + +Email remains, despite the best efforts of the big players, the most ubiquitous +decentralized communication method. It is a relic from the old internet, built +by academics focused on communicating and sharing research, rather than +platforms aiming for a >$1 billion valuation. It is, of course, archaic, +somewhat awkward, and constantly under threat from large providers trying to +private this enormously successful piece of web infrastructure. + +Email is not, in a word, "cool" -- most people under the age of 30 rarely use +it for personal communication, and its primary use is as a dumping ground for +"newsletters" and forgot-password links. However, I believe email should be +treated with a certain reverance. It represents values that run counter to the +web of today: it is decentralized, stable, long-form, basically universal, +based on open standards, and difficult to mine for profit. + +Unfortunately, Email software is sorely out of date. Many tools are ancient, +outdated, and difficult to use. I decided that mailing lists could use a bit of +a refresh, which is why I built crabmail. + +Crabmail does one thing: takes a maildir folder and converts it into a static +HTML archive. In combination with other tools, you can create a simple mailing +list. + +## Receive-only +One problem with mailing lists is they don't really fit into the way people use +email or computers these days. Few people are email "power users", and getting +mailing lists set up, making sure they don't go to spam, etc, can be a somewhat +difficult task. On the other side, making sure emails reliably get sent to list members +can be a difficult task, which requires additional infrastructure. + +My solution to this is to have a mailing list that is *receive-only* -- the +list only handles receiving and publishing emails, not sending them. If you +want to make sure someone is included on an email, you can CC them directly. If +you want to follow an email discussion thread or list, you can use an Atom/RSS +feed reader. To reply to an email, you use mailto: links on the web archive. +This dramatically simplifies the infrastructure, making self-hosting much +easier. + +## The technical details +This guide will show you how to set up crabmail to host your own mailing lists. +What you will end up with is a set of IMAP folders that are mirrored on the web, +similar to Here's what you'll need: + +- Some sysadmin knowledge (ability to configure plain text files, install a program from the command line) +- An email account with IMAP access, and preferably Sieve scripting support +- An computer to run a background job +- A place to host static files + +You will end up with something that looks like this: +=> + +### Gettting an email account with IMAP access +First, you will need an email provider that supports IMAP, and preferably sieve[x] +filters. +Some options include: +=> fastmail +=> migadu + +This filter will match any email sent to lists+[listname]@[yourdomain] and filter it into the folter lists/[listname]. In Migadu, which I use, this folder is created automatically by this filter (which means people can create their own lists!) + +You will use your IMAP email in order to moderate your list: deleting spam or off-topic posts, blocking users, and so on. You could also set up a private allowlisted mailing list using sieve filters. + +## Building the archive +To build the archive, we will first need to sync our imap folders to a local maildir folder +Donwload isync and configure it to pull from your IMAP email to a local maildir +folder. I recommend a folder with lists as subfolders. => + + +Crabmail will use this folder to generate the archive + +Make sure you have cargo installed, then download crabmail and install it: + +``` git clone git:// cd crabmail && cargo +install --path . ``` + +Write a config file + +Build the archive, referencing the mbsync'd folder: ``` crabmail [folder] -c +config-file.conf ``` + +## Something to serve files +This guide will use sourcehut pages, a simple and free software-backed +solution, but you can use any equivalent file host. => + +Start with this guide: => + +tar your site/ folder. + +You can run all this on cron, using this script: ... + +=> +=>