Your whole mailbox, in a database.

meerail downloads every message you own into PostgreSQL, then puts a familiar email client on top of it. Real regex search that reads inside your attachments, full keyboard control, and a mailbox any LLM can actually read.

What makes meerail different

Most email clients hide your mail behind a search box someone else designed. meerail hands you the whole archive.

Every message in PostgreSQL

meerail syncs your accounts over IMAP and stores every message, header, recipient and attachment in Postgres — the original .eml bytes included. Nothing is summarised away, and nothing needs the network to read again.

Regex search over everything

Search is a real regular-expression engine over subjects, bodies and extracted attachment text. Match by prefix, alternation or whole words (^Invoice, invoice|receipt, \bcontract\b) and scope it by account, folder or a last-N-years window.

Works with Proton Mail Bridge

Proton keeps your mail out of ordinary clients — meerail is built for it. A small agent runs on your machine and talks IMAP and SMTP to Bridge, so your Proton mailbox becomes a searchable archive without your Bridge credentials ever leaving the host. Aliases and additional addresses work too, and because the agent speaks plain IMAP, Gmail and any other provider work the same way.

Feels like the mail app you know

A three-pane Apple-Mail-style layout: mailboxes, conversation list, message. Threading, a unified inbox across accounts, sandboxed HTML with remote images blocked, light and dark. No relearning where anything lives.

Your hands never leave the keyboard

Move, read, flag, archive, reply and search without reaching for the mouse. Single-key shortcuts throughout, so triaging a morning's mail is a few keystrokes rather than a few hundred clicks.

j k / r e

AI ready, by construction

Because the mailbox is a database, an LLM can query it with plain SQL: no scraping, no per-message API calls, no rate limits. Import the skill below and ask questions of ten years of email.

Self-hosted and open source

One docker compose up gets you the server, Postgres and attachment text extraction. Your mail stays on your machine, and the whole thing is open source as the meerail project.

Attachments searchable to the last word

Every attachment goes through Apache Tika on the way in and its text is stored with the message. A search for termination clause finds the PDF that contains it, not just mails that mention it — same regex syntax on both. Run the OCR image and scanned documents become searchable too.

PDF DOCX XLSX PPTX ODF TXT

Trackers blocked before they load

Remote images are dropped by default, so the tracking pixels in marketing mail never phone home — meerail tells you how many it blocked and lets you load them for a message you trust. The HTML itself is stripped of anything executable and rendered in a sandboxed frame, and your mail credentials stay on your own machine with the agent.

3 remote images blocked Load images

See it

Real screenshots of a running instance. Click any of them to see it full size.

Unified inbox
Regex search
Threaded conversations
Compose

Drop it into your skills directory and restart your agent:

mkdir -p ~/.claude/skills/meerail
curl -o ~/.claude/skills/meerail/SKILL.md \
  https://raw.githubusercontent.com/ribalba/meerail/main/website/public/downloads/SKILL.md
View SKILL.md on GitHub

The skill connects to your container on localhost. Nothing is sent anywhere you don't send it. Already cloned the repo? It's at website/public/downloads/SKILL.md.

“What did the accountant say about the 2024 filing?” “Every invoice over €500 last year.” “Summarise this thread with the landlord.” “Who emails me most and never gets a reply?”

Get started

Two pieces: the server in Docker, and a small agent that sits next to your mail bridge and speaks IMAP so your credentials never leave the host.

1. Check out the code

Everything below runs from the repository, so start by cloning it. You need git and Docker with the Compose plugin; the rest comes out of the containers.

git clone https://github.com/ribalba/meerail.git
cd meerail

2. Run the server

Server, Postgres and Apache Tika, in one command.

cp .env.example .env
docker compose up -d

3. Start the agent

Copy the example config, then edit config.toml and put in your own credentials — the host, ports, username and password for your mail server. For Proton that's the Bridge password shown in the Bridge app, not your Proton password. The agent won't start until they're filled in.

cd agent
cp config.example.toml config.toml
$EDITOR config.toml   # your credentials
./run.sh --once

4. Open your mail

Accounts the agent syncs show up on their own.

open http://localhost:8000

The full documentation lives on GitHub

These four steps are the short version. Every config option, the agent setup for Proton Bridge and other providers, building the desktop app, the test suite and the architecture notes are all documented in the repository — and the code is right there next to them.