BearerMail docs

Quick start

From zero to sending mail as you@yourdomain.com in about fifteen minutes, plus DNS propagation.

What you need

  • A server with Docker and Docker Compose (a VPS, a home server, a NAS that runs containers).
  • A domain you control, with access to its DNS.
  • Port 25 inbound must reach your server — many residential ISPs block it. If yours does, you'll need a VPS or a relay for receiving; see Mail server.

1. Get the code

git clone https://github.com/DanversKara/pl_mail_bearermail.git
cd pl_mail_bearermail

2. Tell it about your domain

export MAIL_DOMAIN=yourdomain.com
export MAIL_ACCOUNTS="you:CHOOSE-A-STRONG-PASSWORD"

MAIL_ACCOUNTS is localpart:password pairs, comma-separated — add more mailboxes the same way (you:pw1,info:pw2). Logins are the full address (you@yourdomain.com). postmaster@ and abuse@ are aliased to your first mailbox automatically.

3. Bring it up

docker compose --profile mail up -d --build

The mail profile adds the two mail-server containers (Postfix + Dovecot) to the normal plMail stack. Without it you get plain plMail, the upstream way.

4. Publish the DKIM record

On first boot the mail server generates a DKIM signing key and prints the DNS record:

docker compose logs mta | sed -n '/== DKIM DNS/,/== end DKIM DNS/p'

Add that as a TXT record at mail._domainkey.yourdomain.com. The other three records you need:

RecordNameValue
MX@10 mail.yourdomain.com.
Amailyour server's public IP (DNS-only — never proxy mail through Cloudflare)
TXT (SPF)@v=spf1 mx ~all
TXT (DMARC)_dmarcv=DMARC1; p=none; rua=mailto:postmaster@yourdomain.com

Full detail, including the dynamic-DNS updater for home IPs, is on the DNS & domains page.

5. Add the account in plMail

In the web UI: Settings → Mail accounts → Add account

FieldValue
IMAP host / portmailstore / 143, no encryption (it never leaves the compose network)
SMTP host / portmta / 587, no encryption
Username / passwordyour full address and the password from MAIL_ACCOUNTS

The sync worker picks the account up within a minute. Send yourself a test mail from Gmail and watch it land:

docker compose logs -f mta

6. Put the app on your phone

Grab the APK from GitHub Releases (foss flavour unless you need Google services), pair it from the server's Settings → App passwords (QR code), and you're done. Details on the Android app page.

Home connection?

If your server sits behind a residential IP, read Dynamic DNS and the relay section of Mail server before you go live — outbound deliverability from a home IP needs a relay, and your A record needs to track the changing IP.