* ci: rebuild supported releases when package updates are available
Check the published image of each supported release every hour and only
rebuild when `apt-get upgrade` would change something in it, instead of
rebuilding blindly once a week. Scheduled runs skip an image younger than
3 hours. Manual runs still rebuild unconditionally unless
`only-if-updates` is set.
* docs: describe rebuilds on package updates instead of weekly rebuilds
* ci: ignore packages that never clear when checking for updates
dovecot-fts-xapian is built from source as 1.9.1-1~bpo12+1 in v16, which
apt always sorts below the Debian package, so it would trigger a rebuild
on every cooldown. List the pending packages in the log.
* ci: schedule the check at minute 17 instead of the start of the hour
* docs: link the changelog entry to the PR
* docs: fix the changelog link text
* ci: do not trigger release rebuilds on Rspamd updates
v16 installs Rspamd from the rspamd.com apt repository, so every upstream
release showed up as a pending update and would be published to the floating
tags. Rebuilds should only pick up Debian updates. From v17 on, Rspamd is a
pinned `.deb` without an apt repository.
* ci: attempt a scheduled release rebuild only once per set of pending updates
The cooldown is based on the age of the published image, but a failed rebuild
publishes nothing. A rebuild that keeps failing was therefore started again on
every hourly run, and an update that never clears every 3 hours.
Each attempt is now recorded as an artifact named after the release and a hash
of the pending updates (`name=version`, ignored packages left out). The
`resolve` job skips a release whose pending updates were already attempted. The
record is written by a new `record-attempt` job that runs in parallel to the
rebuild, so it exists whatever the outcome is. It expires after 7 days, so the
same updates are retried at most once a week. New updates change the name and
are attempted right away.
Also pass `--error-on=any` to `apt-get update` in the check: without it, apt
exits 0 when index downloads fail, which made an outage look like "nothing
pending" instead of failing the job.
* ci: check for package updates daily instead of hourly
The check runs at 06:17 UTC. A fix reaches the floating tags within about a day
plus the build time instead of within about an hour, which is sufficient for
Debian security updates and needs far fewer scheduled runs.
* ci: remove the cooldown for scheduled release rebuilds
The check runs once a day, which already limits how often the floating tags
move. A rebuild loop is prevented by the recorded attempts, so the age of the
published image no longer needs to be checked.
---------
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* feat(ci): rebuild latest release weekly and move its floating tags
Rebuilds the latest release tag without cached layers so the existing
`apt-get upgrade` in packages.sh picks up new Debian security fixes,
tests it, then republishes X, X.Y, X.Y.Z plus an immutable X.Y.Z-rN tag.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(ci): only the newest release may move the latest tag
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs: describe weekly release rebuilds and tags
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(ci): explain how the release tag is resolved
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* docs(changelog): trim rebuild entry to user-facing change
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
* fix(ci): address review feedback on release rebuilds
Rebuild only the latest release (drop the release-tag dispatch input) so
older releases cannot move floating tags, which also lets latest use the
default flavor again. Fail on registry errors other than not-found when
probing for rebuild numbers, serialize rebuilds, take the revision label
from the checked-out tag, and use a dedicated cache scope for rebuilds.
* feat(ci): rebuild every supported major, not only the latest release
The supported majors are listed in the workflow (those whose Debian base
still gets security updates). Each line runs its own build, test and
publish chain so a failing line cannot block another. Only the newest
release overall may move latest.
* ci: only rebuild v16 for now
v15 cannot pass its own tests anymore (bitnami/openldap:latest is gone).
* fix(ci): skip a rebuild publish when a newer release appeared
Re-check the newest release right before publishing, and decide latest
from that check. Also list the -r0 tag of tag pushes in the docs.
---------
Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* feat(fail2ban): add `setup fail2ban ignore` and `consider`
Adding an address to the Fail2Ban ignore list at runtime needed
fail2ban-client and a loop over every jail. This carries over #4504
and addresses its review.
Co-authored-by: Andrew Cornford <29998536+groupmsl@users.noreply.github.com>
* fix(fail2ban): reject invalid addresses and list ignores under `status`
fail2ban-client treats anything that is not an IP address as a hostname, so a typo like 192.0.2.300 was accepted silently. `ignore` and `consider` now check the argument and pass it on in the spelling F2B uses, which `delignoreip` needs to find a single IPv6 address again.
Plain `setup fail2ban` shows bans only again, as before this PR.
---------
Co-authored-by: Andrew Cornford <29998536+groupmsl@users.noreply.github.com>
Postfix LDAP configs are now generated at startup to `/etc/postfix/ldap/<KIND>.cf`
(`users`, `groups`, `aliases`, `domains`, `senders`) from these sources, later ones take precedence:
1. Defaults (`version = 3`, `result_attribute = mail`, `senders`: `mail, uid`).
2. `LDAP_<SETTING>` ENV for all configs.
3. The custom config `ldap-<KIND>.cf` from the DMS config volume (now also supported for `senders`).
4. `POSTFIX_<KIND>_<SETTING>` ENV for a single config.
A config without `query_filter` is not generated and its lookup table is not configured
(including `smtpd_sender_login_maps` with `SPOOF_PROTECTION=1`). Previously all lookup
tables were always configured, as the default configs shipped by the image always existed.
Breaking:
- `LDAP_QUERY_FILTER_{USER,GROUP,ALIAS,DOMAIN,SENDERS}` are renamed to
`POSTFIX_{USERS,GROUPS,ALIASES,DOMAINS,SENDERS}_QUERY_FILTER` (an error is logged when the old ENV is set).
- `/etc/postfix/ldap-*.cf` moved to `/etc/postfix/ldap/*.cf`, the default configs (with default query filters) were removed.
Reworked from the original "Config Templates" proposal: Dovecot (already reworked for Dovecot 2.4)
and SASLAuthd are unchanged, and no template files or additional dependencies (`zenv`, `envsubst`) are required.
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
* Update Solr image and clean up FTS configuration
Updated Solr image version, fixed SOLR_MODULES format and explictly start solr in user-managed mode. Removed commented-out FTS decoder configuration: it is not advised and incorrect for the debian provided dovecot packages. Tika is a better alternative and easy to implement but this is a dovecot fts feature and not fts solr specific so that doesn't belong in the solr tutorial.
* Fix Dovecot FTS solr configuration
Pinned FTS solr config to solr:10.0, started solr in user managed mode, and removed the attachment text extraction example.
---------
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Commit referenced upstream for xoauth examples had become outdated. New links now pin by release tag instead of commit for clarity.
---------
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
The path was still referring to an internal location used prior to preferring the DMS config volume, this has been corrected.
---------
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>