pl_mail README

The project's README from github.com/karatektus/pl_mail. As one markdown file: README.md.

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.

📱 Apps for your phone

Both connect to your own plMail server.


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

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. From another machine, open https:// and the server's address instead; the browser warns about the self-signed certificate once and lets you continue.

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.

pl_mail (karatektus/pl_mail)

notifications
Searching Database…

What is this?plMail is a self-hosted, Gmail-style mail client that connects to IMAP, Gmail, and Outlook mailboxes you already have, syncs them into your own PostgreSQL database, and gives you one inbox, search box, and set of labels in the browser.
Is this a mail server, or just a client for the mail I already have?Just a client. It does not receive mail from the internet or host your domain — it syncs existing IMAP, Gmail, and Outlook accounts into its own database so you get one unified inbox locally.
How do I get it running?Clone the repo and run 'docker compose up', then open the server address and create your account. There is nothing to configure beforehand — secrets are generated on first start and the public address is set from the setup screen.
Do I need OAuth credentials to connect Gmail or Outlook?For Gmail and Outlook accounts, yes — you need OAuth credentials from Google or Microsoft, which the handbook walks through, including an optional Pub/Sub topic for instant Gmail push. Plain IMAP mailboxes just need to be added in Settings with no extra setup.
What happens if I lose the generated secrets file?The encryption key in var/secrets/generated.env unlocks the mailbox credentials stored in PostgreSQL; if you lose that file without a separate backup, your stored mailbox passwords are gone for good.
Can I run plMail on a NAS instead of a regular server?Yes — plMail is listed in the TrueNAS app catalogue and installs with just a database password, plus prebuilt Docker images are published for linux/amd64 and linux/arm64 for any other Docker host.
Does any mail or AI data ever leave my network?No. Credentials are encrypted before they touch the database, and the optional AI features run against an Ollama instance on your own network, off by default, with nothing from them ever leaving your network.
Are there mobile apps?Yes — companion Android (karatektus/plmailandroid) and iOS (karatektus/plmailios) apps both connect to your own self-hosted plMail server.
Can plMail sort my mail into tabs automatically?Yes, either with header rules that always answer the same way or by having the local AI model read each message, with an option on Gmail to let either override Google's own classification; a Report button flags mistakes to the admin.
Does it include a calendar?Yes — a calendar sits beside the mail with two-way sync to Google, Microsoft, and CalDAV, a drag-to-move week grid, in-place invitation replies, and sharing and booking links.
How customizable is the interface?plMail ships with 41 light and dark themes, ten app/home-screen icons each available in 32 colourways, and interface language options including English, German, and a Pirate mode.
Creator
karatektus
Size
31.9 MB
Stars
336
Updated
CommitOct 17
Age
3mo
Commits · 90 Days