feat(web1): add mailflow webmail stack, drop tmail webmail - #485
Merged
Merged
Conversation
Replace the stopped tmail-web "webmail" stack on web1 with MailFlow 3.8.1 (unified IMAP/SMTP webmail): nginx frontend, Node backend, PostgreSQL 18 and Valkey, adapted from upstream docker-compose.ghcr.yml. - Frontend published HTTP-only on 127.0.0.1:3008; TLS stays with the host reverse proxy, upstream's Caddy profile is dropped. - Frontend and backend: cap_drop ALL, no-new-privileges, read_only with tmpfs. nginx needs CHOWN/SETUID/SETGID (temp dirs, worker drop) plus NET_BIND_SERVICE for :80/:443. - Postgres/Valkey are exempt per the data-store rule; images match the digests already pinned for twenty. - Migration 0004 composes down the old webmail project and removes /opt/containers/webmail, which the copy task would otherwise leave. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mzrFnReayRM6LnqhZks6R
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 30 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (8)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Drop the inline environment blocks: backend wiring now lives in .env and the postgres container reads its own .env.postgres (twenty's pattern), both with committed .example files. The pg_isready healthcheck reads POSTGRES_USER/POSTGRES_DB from the container env instead of hardcoding. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011mzrFnReayRM6LnqhZks6R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the retired tmail-web "webmail" stack with MailFlow, a unified IMAP/SMTP webmail client. This includes the new MailFlow compose configuration, environment setup, migration cleanup, and documentation updates.
Changes
New MailFlow stack (
web1/containers/mailflow/):docker-compose.yml: Four-service stack (frontend nginx, Node.js backend, PostgreSQL 18, Valkey 9.1)cap_drop: [ALL],no-new-privileges: true, read-only roots with tmpfs127.0.0.1:3008(TLS terminated by host reverse proxy)/api/health; database and cache health checks included.env.example: Template for required secrets (SESSION_SECRET, DB_PASSWORD, ENCRYPTION_KEY) and optional features (web push, Google OAuth, IMAP tuning)Removed old webmail stack (
web1/containers/webmail/):Migration task (
web1/ansible/migrations/20261004_0004_remove_webmail_stack.yml):/opt/containers/webmaildirectory on deployAnsible configuration updates:
docker_stacksinroles/system/containers/defaults/main.yml: Changed webmail fromstate: stoppedto mailflow withstate: presentandenv_file: trueenv.filecreation task fromroles/system/containers/tasks/main.ymlDocumentation (
CLAUDE.md):Implementation Details
TRUST_PROXY_HOPS=2(frontend nginx + host reverse proxy)ENCRYPTION_KEY) is critical — changing it invalidates stored IMAP/SMTP credentialsUPDATE_CHECK_DISABLED=trueprevents redundant checks--save 60 1)https://claude.ai/code/session_011mzrFnReayRM6LnqhZks6R