0
Fork 0
mirror of https://github.com/oblien/openship.git synced 2026-11-16 06:57:12 +00:00
openship/apps/email/docker
Saim Shafique ea0d015b86
Preserve mail logs and ban history safely across engine updates (#1705)
* fix(mail): persist mail logs, fail2ban database and ignoreip across engine updates

Mail engine updates recreate the container (docker rm -f + docker run),
so anything not on a bind mount is lost: /var/log (mail.log, dovecot and
fail2ban logs), fail2ban's SQLite database, and operator ignoreip
customisations in /etc/fail2ban.

- Bind-mount /var/log and /var/lib/fail2ban from the host mail state dir.
  Deliberately not /etc/fail2ban: a seed-once mount would hide later image
  changes (same trap as #392's master.cf).
- Render operator ignoreip additions (OPENSHIP_MAIL_F2B_IGNOREIP, passed
  through engine.env) into a jail.d override on every boot, as baked
  jail.local value + operator value, so image defaults are never dropped.
- Run cron under supervisord so logrotate's daily job actually fires for
  the now-persisted logs; logrotate is installed explicitly (only a
  Recommends of rsyslog) and build-gated.

Fixes #1701

* Preserve existing mail state before replacement and repair supervised log rotation

---------

Co-authored-by: Hydra <abdelhamedmo59@gmail.com>
History 2026-11-11 16:54:11 +02:00
..
build-config Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
configure-fail2ban-db.py fix(mail): complete fail2ban PostgreSQL sidecar connections 2026-10-15 01:29:49 +03:00
db-bootstrap.sh fix(mail): make the DB bootstrap fail loudly instead of silently (GH-562) 2026-08-14 22:42:39 +03:00
entrypoint.sh Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
logrotate-clamav-freshclam Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
postfix-chroot-etc.sh update patch v0.6.8 2026-08-23 14:49:18 +03:00
postfix-filter-tls.sh Merge bug integration and adapt relay TLS repair to the current mail engine 2026-09-16 06:19:22 +03:00
prepare-amavis-runtime.sh test(mail): verify Amavis restart recovery with real Debian daemons 2026-09-15 23:43:31 +03:00
prepare-dovecot-runtime.sh fix(mail): drop Dovecot's stale pid file before supervisord starts (#1704) 2026-11-11 15:43:59 +02:00
prepare-mail-logs.sh Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
reconcile-db-port.py fix(mail): share strict sender ownership for active direct aliases (#1634) 2026-11-06 14:42:47 +02:00
reconcile-ssl.sh fix(mail): validate and restore mounted TLS identities on every boot 2026-09-15 21:27:42 +03:00
rsyslog-rotate Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
sender_aliases.py fix(mail): share strict sender ownership for active direct aliases (#1634) 2026-11-06 14:42:47 +02:00
supervisord.conf Preserve mail logs and ban history safely across engine updates (#1705) 2026-11-11 16:54:11 +02:00
verify-dovecot-security.sh Fix webmail printing and refresh security dependencies (#1718) 2026-11-11 13:35:06 +02:00