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

commit 67418be03e9a3a509316ef600e1bea741e4ac31d
parent 6c55619285e372000aefa46fee7024c04781befe
Author: alex wennerberg <>
Date:   Sat,  1 Jan 2022 20:24:04 -0800

remove howto

DHOWTO | 85-------------------------------------------------------------------------------
1 file changed, 0 insertions(+), 85 deletions(-)

diff --git a/HOWTO b/HOWTO @@ -1,85 +0,0 @@ -# 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. - -Download isync (mbsync) 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. An example config is in misc/config. Add your IMAP credentials and create the ~/mail/lists directory. Then copy the mbsync config file in misc/config to ~/.mbsyncrc - -Then run: -``` -mbsync --all -``` - -This should copy your lists/ IMAP folder and subfolders to ~/mail/lists. You may want to send a few test emails to these folders to make sure you have some data first. - -Make sure you have cargo installed, then download crabmail and install it: - -``` -git clone git:// -cd crabmail && cargo install --path . -``` - -Copy crabmail.conf to mylists.conf and reference your email and the domain you'll host your site on. - -Build the archive: -``` -crabmail ~/mail/lists -mylists.conf -``` - -Check out site/index.html to see what your site looks like! - -## Deploying your list archive -(I will flesh this section out a bit more when I feel more solid about the easiest way to do things) - -You'll need two things to deploy your site. First, some place to run this job at a regular interval - -If you want to rebuild your index every time you get a new email, check out - -Otherwise, you can run cron at a reasonable interval (no less than 5 mins probably). You'll need to run this on an always on server, like a rasperry pi, or a cloud server / job scheduler. Note that wherever you host this will have FULL access to your email account, so you may want to either use a separate email account for this puprose or run this program on a server that isn't exposed to the internet. - -TBD TBD - -### Footnotes -=> -=>