Quality IMAP, Part 1: Your Mailbox Is A Database

Published on

November 16, 2026

19 min reading time

3704 words

*During the past year, we have significantly improved the reliability and correctness of Aerogramme's IMAP implementation. This is the first part in a series of blog posts elaborating on why implementing IMAP correctly is not so easy, and the set of techniques we have been using to make our IMAP code as high-quality as we can. In this first part, we focus on one challenging aspect of IMAP: fine-grained retrieval and querying of emails.*


*Aerogramme is an experimental email server (& calendar, contacts), designed to be geo-distributed, hosted outside of datacenters, on refurbished hardware, and reliable even in presence of network issues and hardware failures. It is built on top of Garage and shares the same philosophy. Aerogramme is AI-free: we do not wish to use unethical technology and prefer to spend effort on careful craftmanship and community-building.*