- Maintain Forward Email specific overrides for the SnappyMail clone that lives in
mail/. - Keep the
mail/submodule pristine; apply branding through root-level overrides only. - Deliver reproducible builds via
./scripts/build.sh, and validate changes with the provided Docker/PHP tooling.
mail/→ git submodule toforwardemail/mail(clean SnappyMail). Treat as read-only.dist/→ build output (gitignored). Generated by scripts; never hand-edit.plugins/,themes/,configs/→ authoritative sources for Forward Email customizations.scripts/→ automation (build.sh,clean.sh,update-snappymail.sh).docker/→ local-only Docker Compose stack (SnappyMail + Redis).
git submodule update --init --recursive # pull SnappyMail clone
cd mail && npm install && npx gulp && cd .. # compile SnappyMail assets
chmod +x scripts/*.sh
./scripts/build.sh # sync overrides into mail/- Edit files only under
plugins/,themes/, orconfigs/. - Run
./scripts/build.shafter every change to repopulatemail/with overrides. - For local smoke tests:
- Docker:
docker-compose -f docker/docker-compose.yml up(preferred). - PHP:
cd dist && php -S localhost:8000(Redis unavailable).
- Docker:
- Inspect logs with
docker logs -f snappymail-local-devand validate Redis viadocker exec -it snappymail-redis-dev redis-cli ping.
- Forward Email theme renders on http://localhost:8080.
- All three plugins (ForwardEmail, Redis Ephemeral Sessions, Client IP Passthrough) appear and enable in admin (
/?admin). - Redis connection test succeeds (use provided JSON action or
redis-cli). - Sessions persist in Redis and respect TTL.
- No errors in container logs or SnappyMail UI.
- Production rollout is orchestrated from the
forwardemail/forwardemail.netmonorepo via Ansible. - Ensure
./scripts/build.shhas been run before handing off. - Standard flow:
- Commit and push changes here.
- In
forwardemail.net, pull latestmail-overrides. - Run
ansible-playbook ansible/playbooks/deploy-webmail.yml(build + rsync + permissions).
- Do keep
mail/anddist/free of manual edits. - Do regenerate builds after modifying overrides or updating the SnappyMail submodule.
- Do coordinate SnappyMail version bumps via
scripts/update-snappymail.shand document in commit messages. - Don't commit Docker build artifacts or local configuration overrides.
- Don't bypass the build script when preparing for deployment; Ansible relies on its output.
README.md→ overview, architecture, workflows.QUICKSTART.md→ five-minute setup and command snippets.SETUP.md→ integration with the main monorepo.ARCHITECTURE.md→ multi-layer git/submodule model.TESTING.md→ exhaustive local testing + troubleshooting.SUMMARY.md→ high-level recap and next steps.