Sign inSign up

solarssk/mail-autodiscover

By solarssk

•Updated 5 days ago

Self-hosted profile service for your own mail domains. No SaaS relay, no per-client manual setup.

Image
Security
Integration & delivery
0

4.4K

solarssk/mail-autodiscover repository overview

⁠mail-autodiscover

CI   Verify standard   Code coverage   SonarCloud Quality Gate   Latest release   License: MIT

GHCR: solarssk/mail-autodiscover   Platforms: amd64, arm64

Self-hosted Outlook Autodiscover, Thunderbird Autoconfig, and Apple Mail profile service for your own mail domains.
No SaaS relay, no mailbox database, no per-client manual setup.

Full documentation, source, and issue tracker live on GitHub: github.com/solarssk/mail-autodiscover⁠.

⁠What it does

For any syntactically valid mailbox in an allowed domain, the service returns the configured IMAP/SMTP settings and, optionally, POP3 for Thunderbird — regardless of whether that specific mailbox actually exists, and without ever exposing the internal domain list on the landing page.

It does not:

  • verify whether a mailbox actually exists
  • store, manage, or ever see mailbox passwords
  • expose an admin panel or a database
  • do LDAP / Synology / directory lookups

If you want a service you can deploy behind HTTPS and mostly forget about, this is what it's for.

⁠How it works

  1. A mail client (Outlook, Thunderbird, or Apple Mail) requests autoconfiguration for a mailbox address.
  2. The service checks whether the address's domain is in ALLOWED_DOMAINS or the mounted CONFIG_FILE.
  3. Unknown domain → a neutral 404, identical for every unknown mailbox — no enumeration.
  4. Known domain → the IMAP/SMTP/POP3 settings for that domain are built from ENV or YAML and returned as XML or a .mobileconfig profile.

Every request is stateless — no database, no mailbox-existence lookup anywhere in the flow.

⁠Features

FeatureWhat it does
📧Outlook AutodiscoverPOST /autodiscover/autodiscover.xml, with a neutral GET response too.
🦅Thunderbird AutoconfigGET /mail/config-v1.1.xml, plus the .well-known alias Thunderbird tries automatically.
🍎Apple Mail profilesUnsigned .mobileconfig at GET /mail/ios.mobileconfig, with stable per-mailbox identifiers so re-downloading updates instead of duplicating.
🏢Multi-domain YAML configOne container can serve entirely different IMAP/SMTP/POP3 settings per domain via a mounted config.yaml.
🚫No mailbox enumerationEvery syntactically valid address in an allowed domain gets the exact same response shape — verified in the test suite, not just claimed.
🚦Defense in depthSafe XML parsing (defusedxml), bounded in-memory rate limiting, security headers on every response, log-injection–resistant access logs.

⁠Stack

LayerTechnologies
🐍RuntimePython ≥ 3.12 (image built on 3.14)
⚡FrameworkFastAPI + Uvicorn
⚙️Configpydantic-settings — environment variables or a mounted YAML file
🛡️CI/CD securityCodeQL, Trivy (HIGH/CRITICAL gate on every published digest), SonarCloud, pip-audit against a hash-pinned lockfile, CycloneDX SBOM per platform, and a mechanical check against our own internal engineering standard on every push

⁠Quick start

docker run -d \
  -p 8000:8000 \
  -e APP_ENV=production \
  -e PUBLIC_BASE_URL=https://autodiscover.example.com \
  -e ALLOWED_DOMAINS=example.com \
  -e MAIL_DISPLAY_NAME="Example Mail" \
  -e IMAP_HOST=mail.example.com \
  -e SMTP_HOST=mail.example.com \
  solarssk/mail-autodiscover:latest

Put it behind an HTTPS reverse proxy and point your autodiscover./autoconfig. DNS records at it. Full environment variable reference, multi-domain YAML setup, and reverse-proxy guides (Nginx, Caddy, Nginx Proxy Manager, Synology, Cloudflare Tunnel): see the README⁠ and docs/⁠.

⁠Image tags

solarssk/mail-autodiscover:latest        # tracks the most recent main build
solarssk/mail-autodiscover:sha-<short>   # exact commit, for traceability

Pinned release tags (X.Y.Z) start from the next version tagged after this image began publishing to Docker Hub — check the Releases page⁠ for the latest one, and prefer it over latest in production.

Multi-arch manifest (linux/amd64 + linux/arm64) — Docker pulls the one matching your host automatically. Every published digest passes a Trivy HIGH/CRITICAL gate before it's pushed, and the exact same image is also published to ghcr.io/solarssk/mail-autodiscover⁠ — same digest, same scan results, either registry works.

⁠License

MIT

Tag summary

Content type

Image

Digest

sha256:3183ba5a3…

Size

61.2 MB

Last updated

5 days ago

docker pull solarssk/mail-autodiscover