Skip to content

Self-host Mailu mail stack at mail.profullstack.com#17

Merged
ralyodio merged 1 commit into
mainfrom
feat/mailu-stack
Jun 14, 2026
Merged

Self-host Mailu mail stack at mail.profullstack.com#17
ralyodio merged 1 commit into
mainfrom
feat/mailu-stack

Conversation

@ralyodio

Copy link
Copy Markdown
Contributor

What

Stands up a self-hosted Mailu stack (Postfix + Dovecot + Roundcube + rspamd) so paid members get a real <name>@mail.profullstack.com mailbox. Pairs with the AgentMail reader (PR #16) and @logicsrc/plugin-agentmail (logicsrc #73).

Architecture

Coexists with the host Caddy (which owns :80/:443):

  • Mailu owns the mail ports (25/465/587/993/995); its HTTP front is loopback-only.
  • Caddy fronts https://mail.profullstack.com → Roundcube (webmail = the only member-facing surface) and obtains the LE cert; refresh-certs.sh copies it into Mailu (TLS_FLAVOR=mail) — the same cert-copy pattern already used for Ergo/IRC and NNTP.
  • The agentbbs gateway reads via a Dovecot master user (<name>*gateway) and submits via the local relay (127.0.0.1:25), so members never manage IMAP/SMTP passwords.
webmail → Caddy :443  mail.profullstack.com → 127.0.0.1:8080 (Mailu front)
clients → Mailu :25 :465 :587 :993 :995 → Postfix / Dovecot / rspamd
agentbbs → IMAP 993 (master user) + SMTP 127.0.0.1:25

Files

  • deploy/mailu/docker-compose.yml, mailu.env.example, refresh-certs.sh, provision-mailbox.sh, README.md, .gitignore.
  • setup.shMAIL flag, mail.${DOMAIN#*.} Caddy site, §9e (cert timer, mail-port firewall, conditional docker compose up, AGENTBBS_MAIL_* env).
  • docs/mail.md — architecture, DNS (MX/SPF/DKIM/DMARC/PTR; mail./smtp. A records already added), gateway master-user setup, env, provisioning, webmail-only policy.

Verification

Infra is inspection-verified: bash -n setup.sh and both scripts pass; docker-compose.yml is valid YAML. Actual deploy (compose up, cert issuance, DKIM, deliverability) is pending on the host — see the port-25 / PTR notes in docs/mail.md.

Notes

  • Apex profullstack.com stays corporate; member mail is only on mail.*.
  • Mailu image tags + the Dovecot master-user passdb override should be verified against the pinned release before production (flagged in deploy/mailu/README.md).
  • Based on current main.

🤖 Generated with Claude Code

Members get a real <name>@mail.profullstack.com mailbox, served by a
co-located Mailu (Postfix+Dovecot+Roundcube+rspamd) Docker stack. Coexists
with the host Caddy: Mailu owns the mail ports; Caddy fronts the loopback
webmail and supplies the TLS cert (TLS_FLAVOR=mail), the same cert-copy
pattern as the Ergo/IRC and NNTP services.

- deploy/mailu/: docker-compose.yml, mailu.env.example, refresh-certs.sh
  (copy Caddy's mail cert into Mailu on renewal), provision-mailbox.sh
  (member mailbox + Dovecot gateway master user), README.
- setup.sh: MAIL flag + mail.${DOMAIN#*.} Caddy site + §9e (cert timer,
  mail-port firewall, conditional compose bring-up, AGENTBBS_MAIL_* env).
- docs/mail.md: architecture, DNS (MX/SPF/DKIM/DMARC/PTR), gateway
  master-user setup, env, provisioning, webmail-only policy.

Apex profullstack.com stays corporate; member mail is only on mail.*.
Infra is inspection-verified (bash -n, YAML lint); deploy pending.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown

vu1nz Security Review

0 finding(s) in PR #?

No security issues found.

@ralyodio
ralyodio merged commit 8113b6d into main Jun 14, 2026
5 checks passed
@ralyodio
ralyodio deleted the feat/mailu-stack branch June 14, 2026 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant