Files
vps/runbooks/mailcow-update.md
T
windyboy b03d7019c4 docs: onboard AdGuard Home to Ansible; retire check-mx2; migrate plan to Linear
- Add dns.windy.lan to Ansible inventory (adguardhome group/profile) with a
  read-only healthcheck template, systemd timer, and on-demand report parity
  with the other active hosts; verified green on the host.
- Add synapse.chans.xyz to the AGENTS.md active-host quick map.
- Remove plans/; migrate decisions/verification to a Linear vps project doc and
  file the remaining gaps as W1N-46..49 with blocking edges.
- Retire scripts/check-mx2.sh; point mailcow health/update runbooks and the
  mx2 host file at the Ansible health report.
- Trim us2 stub software to verified running services; note dormant dirs.
- Normalize repo docs to English; drop the non-existent CONTEXT.md/ADR claim
  and remove docs/agents/domain.md.
2026-08-06 15:48:48 +08:00

1.6 KiB

Runbook: mailcow update (mx2)

Target: mx2.windy.me
Path: /opt/mail
Confirm with the user before running an update.

Before

  1. Run mailcow-health (Ansible health report). Record baseline.
  2. Note config quirks in mailcow.conf, especially:
    • SKIP_CLAMD=y — after update, clamd may still be running until services are recreated per mailcow docs.
    • SKIP_LETS_ENCRYPT, ports, hostname — should stay mx2.windy.me.
  3. Disk/memory: df -h / and free -h on the host.

Update

ssh -t windy@mx2.windy.me 'cd /opt/mail && ./update.sh'
  • Prefer interactive SSH (-t) so prompts work.
  • Do not pass secrets into the chat log; do not commit mailcow.conf.

If update asks to stop/recreate containers, allow it unless the user said otherwise.

After

  1. Re-run health checks (mailcow-health).

  2. Confirm UI: https://mx2.windy.me

  3. Confirm SMTP banner and queue empty.

  4. If SKIP_CLAMD=y but cow-clamd-mailcow-1 is still Up and that is unwanted:

    cd ansible
    ansible-playbook playbooks/compose-reconcile.yml --limit mailcow \
      -e '{"service_reconcile_confirm": true, "service_reconcile_targets": ["all"]}'
    

    Only after user OK; recreate briefly interrupts mail.

  5. Update Verified on hosts/mx2.windy.me.md with date and outcome.

Rollback

Mailcow updates are image/git based; there is no one-click rollback in this runbook. If something fails, capture docker compose ps and docker compose logs --tail=100 for the failing service and stop before further changes.