No description
  • PHP 67.4%
  • JavaScript 14.3%
  • Twig 10.1%
  • TypeScript 6.6%
  • CSS 1.4%
  • Other 0.1%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Léo Schmitt 94769f4d80 Serve the mailboxes of a mail server that shares the container
A local mailbox is one that Postfix and Dovecot deliver to on the same
host. It is provisioned the moment mail arrives for its address, gets a
password of its own rather than a master one, and is shared by giving
each user an Account for it, so ownership works as it does everywhere
else.

A local account is neither editable nor testable from the settings, and
it never idles: delivery triggers the sync instead of one PHP process
per mailbox. The Mercure hub's listen address, options and directory
become configurable because it now shares a container with the web
server, and the account list gains a filter once it grows past six.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:16:45 +02:00
.github feat(admin): a version checker, with a channel to follow 2026-09-24 14:57:14 +02:00
assets Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
bin feat(ops): a demo deploy that cannot quietly do nothing 2026-08-26 11:11:09 +02:00
config Stop a background request deciding where signing in takes you 2026-10-07 16:28:07 +02:00
docker/postgres feat(db): pgvector as an opt-in image, built without changing libc 2026-08-27 12:48:35 +02:00
docs Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
frankenphp Stop rewriting the cache directory at every start 2026-10-07 17:07:40 +02:00
migrations Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
public Make the wax seal the icon an account starts on 2026-10-02 11:41:08 +02:00
src Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
templates Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
tests Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
translations Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
.dockerignore update 2026-07-28 12:33:46 +02:00
.editorconfig Add initial set of files 2026-06-24 14:51:50 +02:00
.env fix(secrets): the JWT keypair lives beside the generated secrets 2026-09-28 13:07:39 +02:00
.env.dev Add initial set of files 2026-06-24 14:51:50 +02:00
.env.test testing 2026-07-21 16:18:46 +02:00
.gitignore release: v0.0.23 — one Message-ID per sent mail, and answering bumps the thread 2026-08-10 12:12:20 +02:00
.nvmrc Set the Node version in one place 2026-07-31 15:45:26 +02:00
.php-version update 2026-07-28 12:33:46 +02:00
CHANGELOG.md Release v0.3.1 2026-10-08 17:05:36 +02:00
CODE-REVIEW.md fix(security): publish every Mercure update as private 2026-09-23 19:36:59 +02:00
CODESTYLE.md fix: a shell that fits the phone, a menu that fits the pane, and tests that survive the fixture 2026-08-25 13:51:45 +02:00
compose.demo.yaml feat(deploy): one worker container runs every background process 2026-09-24 16:20:31 +02:00
compose.override.yaml.dist feat(deploy): one worker container runs every background process 2026-09-24 16:20:31 +02:00
compose.pgvector.yaml feat(db): pgvector as an opt-in image, built without changing libc 2026-08-27 12:48:35 +02:00
compose.prod.yaml init 2026-07-02 13:12:28 +02:00
compose.test.yaml Give the Mercure tokens an identity no installation has to configure 2026-09-21 13:09:36 +02:00
compose.yaml Stop rewriting the cache directory at every start 2026-10-07 17:07:40 +02:00
composer.json build: mercure 0.8, and a database of PHPUnit's own 2026-08-24 15:08:17 +02:00
composer.lock chore(deps): Bump the minor-and-patch group across 1 directory with 11 updates (#22) 2026-09-25 17:02:11 +02:00
CONTRIBUTING.md Serve the mailboxes of a mail server that shares the container 2026-10-12 21:16:45 +02:00
DESIGN.md feat(calendar): answering an invitation shows the meeting in the calendar 2026-09-29 18:27:37 +02:00
Dockerfile Let the image run as a user that is not root 2026-10-04 10:06:02 +02:00
importmap.php feat: sign a PDF by drawing on it, and reply with the signed copy 2026-08-25 15:54:36 +02:00
LICENSE Actually license the project 2026-07-31 12:28:04 +02:00
package-lock.json chore(deps-dev): Bump @types/node from 26.5.1 to 26.6.2 (#21) 2026-09-25 17:02:07 +02:00
package.json chore(deps-dev): Bump @types/node from 26.5.1 to 26.6.2 (#21) 2026-09-25 17:02:07 +02:00
phploc.phar Put the week on a time grid, carry calendars in and out as ICS, and 2026-08-05 17:31:52 +02:00
phpstan-baseline.neon fix(sync): one mail the database refuses no longer stops a folder 2026-09-24 23:21:13 +02:00
phpstan.dist.neon feat(calendar): a client can ask what changed, and be told the truth 2026-08-31 22:16:15 +02:00
phpunit.dist.xml onboarding. this is a lot 2026-07-30 16:40:31 +02:00
playwright.config.ts fix(compose): a cancelled send no longer reopens a window you closed 2026-08-27 17:16:36 +02:00
plmail-befunde.md feat(compose): send gives the screen back, and the undo moves to a toast 2026-08-22 14:17:52 +02:00
plmailschreibtest.md feat(compose): send gives the screen back, and the undo moves to a toast 2026-08-22 14:17:52 +02:00
README.md Stop rewriting the cache directory at every start 2026-10-07 17:07:40 +02:00
symfony.lock Publish latest from release tags, add a changelog, unstale the roadmap 2026-07-31 12:28:42 +02:00
truenas.compose.yaml Stop rewriting the cache directory at every start 2026-10-07 17:07:40 +02:00
tsconfig.json update theme 2026-07-28 15:44:19 +02:00

plMail

Self-hosted mail with a calendar beside it. Connect the mailboxes you already have — IMAP, Gmail, Outlook — and read them side by side in one inbox, on a server you own.

PHP Symfony PostgreSQL License

📖 Read the handbook →

Installing on Docker, Linux, WSL2, macOS or a NAS · every feature in detail · connecting Gmail and Outlook, with the exact permissions to tick · how the internals work. Also on the wiki and in docs/ — all three are built from the same files.


What it is

A mail client you host yourself. It connects to the mailboxes you already have — IMAP, Gmail, Outlook — syncs them into your own PostgreSQL database, and gives them one inbox, one search box and one set of labels in the browser.

It is not a mail server: it doesn't receive mail from the internet or host your domain. Because everything is synced locally, search runs against your database, and your mail stays readable when a provider doesn't.

The plMail inbox

Highlights

  • Every account in one place — IMAP, Gmail and Outlook side by side, sending aliases included. Credentials are encrypted before they touch the database.
  • New mail arrives on its own — IMAP IDLE, Gmail and Outlook push, browser notifications.
  • Search that means it — full text plus from:, subject:, label:, has:, before: and friends, completed as you type. Every hit shows the words it matched on, marked, in a window of the message around them. What the words found comes first; what the model merely thought looked similar follows, labelled, and never pushes a real match off the page.
  • Filters as a tree — any/all/none, nested, restated in plain English and counted against real mail before you save. Apply one to mail that arrived before it existed.
  • Filed where you drop it — drag a conversation onto a folder, a label or one of the inbox tabs, several at once if they are ticked. A folder moves it and a label just adds itself, so dropping on "Receipts" does not take the mail out of your inbox; Starred stars it and Unread — an optional list of every unread conversation, whatever folder it is in — marks it unread, both where it lies. Only the targets that will accept it light up, and a tab you choose by hand stays chosen when the next message in the thread arrives.
  • A calendar beside the mail — two-way sync with Google, Microsoft and CalDAV, a drag-to-move week grid that pans rather than squeezes on a phone, invitations answered in place and landing in the calendar as you answer them, share and booking links. The time is always in view — on the Happening Soon button, under the name, or at the foot of the sidebar with the next thing coming up.
  • Files where you keep them — attach from and save to Drive, Photos, OneDrive, Dropbox, Nextcloud, Immich and Paperless-ngx.
  • A language model, if you want one — point plMail at an Ollama box on your own network and it can search by meaning, draft replies, summarise a thread and sort mail into tabs. A long thread is summarised from as much of it as fits, and says so; ask for the whole conversation and it runs as a job with a context window to match. What it has been told about how you write is editable in the composer, for one attempt at a time. Off by default, each of the four switched on separately, and nothing ever leaves your network.
  • You decide what sorts your mail — header rules that answer the same way every time, or the model reading each message; and on Gmail, whether either of them is allowed to disagree with Google. Change your mind and the mailbox re-sorts itself in the background. Every message's Details panel shows what all three said and which one won, and a Report button tells your administrator when it got it wrong.
  • It tells you when something breaks — a sign-in that has expired, a calendar that stopped syncing, push that lapsed, work the queue gave up on. Each with what it means for your mail and the smallest thing that fixes it. A Google sign-in dying every week gets named for what it is — Google expires tokens for an app still in Testing — and warned about before the next one.
  • And when there is something newer — follow releases or the main branch, and the administrators hear about each new build once: on their devices and at the top of the admin area, with what changed since the one they run.
  • Yours — two-factor auth, per-app JMAP passwords, 41 themes, ten icons for the tab and the phone's home screen, English, German and Pirate.

A look around

Reading a thread Writing a message
Threads — replies collapse into one conversation. Compose — rich text, autocomplete, undo send.
Dark mode Calendar
Themes — 41 of them, light and dark. Calendar — docked beside the mail, or its own page.
Filters Admin
Filters — counted before you save. Admin — workers, push health, logs, queue.
Choosing an icon Choosing its colours
Icons — ten of them, a blue horn among them. Colourways — each icon in its own colours, or any of 32.

Screenshots use demo data — none of the accounts, senders or messages shown are real.

Install

Images are published for linux/amd64 and linux/arm64. Nothing to fill in first: the secrets are generated on first start, and the public address is asked for on the setup screen.

Docker

git clone https://github.com/karatektus/pl_mail.git
cd pl_mail
docker compose up -d

Open https://localhost and create your account.

TrueNAS

plMail is in the TrueNAS app catalogue. Apps → Discover Apps, search for plMail, and install it. The form asks for one thing, a database password; everything else has a default that works.

Reach it on port 30519, and put a reverse proxy in front of it if it should be reachable from outside. Updates arrive through the catalogue like any other app's.

Then

Add an IMAP mailbox in Settings → Mail accounts and you're done. Gmail and Outlook need OAuth credentials from Google or Microsoft first — the handbook walks through both, including the optional Pub/Sub topic for instant Gmail delivery.

Back up two things, separately: the PostgreSQL data and var/secrets/generated.env. The database holds your mail; the key inside that file unlocks the credentials in it. Keeping them apart is the point — and losing the key means the stored mailbox passwords are gone.

Contributing

Bug reports and pull requests welcome — see CONTRIBUTING.md for the dev setup, the test suites and the console commands.

License

AGPL-3.0.