Has anyone used DuckDB (or anything else) to create an open source way to publish a mailbox so that a regular person can browse it and search it?

I'm aware of jmail.world, but they haven't (yet?) published the source code.

I had Claude hack something together recently: https://healdsburg-youcubed-emails.vercel.app/

It works fine for this small set of emails, although the search isn't great, and there was more preprocessing that I would have liked. (I would prefer to be able to point a single binary at a pst or mbox file, and have it magically serve it like this, even if it means I need a VPS to serve it.)

Simon Willison wonderful Datasette plus the mbox-to-sqlite extension is exactly what you want.

https://datasette.io/

https://github.com/simonw/mbox-to-sqlite

This is good but the UI is nothing like a regular mail client, so would be difficult to use for non-technical users.

Maybe https://github.com/wesm/msgvault will do what you need?

Hmm... on second thoughts, msgvault has a pretty good HTTP API so it shouldn't be too difficult to create a nice web UI.

Thanks.

msgvault seems really good. The tui is fast and FTS5 search works well.

I will definitely use it.

But it doesn't allow me to make a mailbox accessible to a wide audience, because:

- AFAICT there's no web version

- inline images don't show up

What’s your use case for this?

Making it easy for members of the public to search and browse email sent by or to government employees.

These emails aren't published by default but email archives are often included in responses to public record requests.

Ideally anyone who receives one of these archives would be able easily inspect it themselves, and also make it available to others.

Here's one: a client of mine has a bunch of SnapLogic pipelines that are configured to send errors via email, and there is no other persistent logging system. This results in tens of thousands of emails that are insanely hard to search and parse for any useful auditing.