64 Commits
Author SHA1 Message Date
Georg Lauterbach 79b66c8b89 config(dovecot)!: ship a self-reliant configuration (#4861)
* breaking(dovecot): ship a self-reliant Dovecot configuration

DMS imported the config files of Debian's Dovecot package at build time
and patched them with `sed` at startup. For the Dovecot Community Edition
(CE) it even downloaded Debian's packages only to extract their config.
The result depended on whatever the packages shipped, and every feature
toggle was an `!include` line that a script had to comment or uncomment.

Provide the complete configuration in the repository instead:

- `target/dovecot/dovecot.conf` replaces the `10-*`, `15-*`, `20-*` and
  `90-*` files as well as the `*.inc` files. Everything that is not set
  there uses Dovecot's built-in defaults.
- `target/dovecot/features/` holds the optional parts (passwd-file, LDAP
  and OAuth2 authentication, quotas, Rspamd learning). Startup copies the
  ones that are enabled into the empty `/etc/dovecot/conf.d/`, which
  `dovecot.conf` includes before `local.conf` (`dovecot.cf`).
- The scripts only substitute ENV-derived values now; the include
  toggling and the second `sed` per feature are gone.
- Drop the Debian config import and the CE-only download from the build.

Breaking: files that users replaced, bind-mounted or patched in
`/etc/dovecot/conf.d/` no longer exist (see the changelog for the
mapping). Debian's deprecated ManageSieve listener on port 2000 and its
`fts_autoindex*` defaults are gone as well.

Add tests for the removed port 2000 and for a valid `doveconf -n` with the
protocols enabled according to ENV, and adjust the existing tests and
fixtures to the new file layout. Rewrite the Dovecot override docs.

Closes #4841

* fix(dovecot): load enabled features before user supplied config

Features that DMS enables were copied to `conf.d/`, so Dovecot read them
in file name order together with user drop-ins. A user file such as
`90-custom.conf` was read before `quota.conf` or `auth-ldap.conf`, and the
feature silently overrode the user's settings.

- copy enabled features to `/etc/dovecot/features.d/` instead, which
  `dovecot.conf` includes before `conf.d/*.conf`
- include the master user passdb before `conf.d/*.conf` as well, so a
  drop-in can override `auth_master_user_separator`
- create `features.d/auth-ldap.conf` with mode 640 (group `dovecot`), as
  it contains the LDAP bind password
- link the changelog entries to the PR, document the always-active master
  passdb, and adjust docs and tests to the new layout
- test that a `conf.d/` file overrides the quota feature, and that
  `auth-ldap.conf` is not world-readable
2026-11-18 17:59:30 +01:00
Georg Lauterbach 37bcf8bf4d update(jaq,step): update jaq and step
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-15 14:49:55 +01:00
Georg Lauterbach aed6980d09 update(Rspamd): 4.1.5 -> 4.3.0 (#4854)
* update(Rspamd): 4.1.5 -> 4.3.0

---------

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-15 14:49:20 +01:00
Alan SavageandGeorg Lauterbach 626d893992 chore: install swaks from the Debian package (#4837)
* chore: install swaks from the Debian package

Debian Trixie ships the same upstream version (20240103.0) that was
downloaded from the GitHub release, so the download is no longer needed
and the package receives updates from Debian.

* docs(changelog): link the pull request

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-05 22:51:07 +01:00
Chris FunderburgandGeorg Lauterbach 98b6a5b86c fix: dovecot CE builds for 2.4 (#4834)
* fix(build): use Debian's Dovecot config layout with the CE packages

The Dovecot CE repo ships a minimal config layout that DMS does not
expect: no 15-lda.conf, 90-fts.conf or 20-pop3.conf, a 2.3-style
20-managesieve.conf, and a dovecot.conf without the commented
protocols/listen lines or the local.conf include. The startup scripts
then fail to enable LMTP, so Postfix cannot deliver to Dovecot, and a
custom dovecot.cf is ignored.

When DOVECOT_COMMUNITY_REPO=1, install the config files from Debian's
own packages of the same release, as Debian's postinst does. Also
tolerate the missing 90-fts-flatcurve.conf, which only Debian ships,
as the build otherwise fails.

* fix(build): install ssl-cert explicitly

Dovecot and Postfix default to the snakeoil cert from the ssl-cert
package. Debian's dovecot-core depends on ssl-cert, but the Dovecot CE
package does not, so with DOVECOT_COMMUNITY_REPO=1 the cert is missing
and Dovecot fails to start when no SSL_TYPE is set.

* fix(dovecot): disable attachment detection keywords explicitly

Dovecot 2.4.2 changed the default of mail_attachment_detection_options
to add-flags for maildir and dbox. This per-driver default is applied
even with dovecot_config_version = 2.4.0, so LMTP adds a
$HasNoAttachment keyword and maildir stores new mail in cur/ instead of
new/. Set it explicitly to keep the 2.4.0/2.4.1 behaviour. This is a
no-op with Debian's Dovecot 2.4.1.

* tests: make the letsencrypt doveconf check work with Dovecot 2.4.2+

Querying `doveconf ssl_server` prints nothing with Dovecot 2.4.5, and
querying the full setting names prints empty values with 2.4.1. Use
`doveconf -n -P`, which prints the same lines on both.

* docs: add changelog entries for the Dovecot CE build fixes

* docs: link the changelog entries to #4834

* fix(build): exclude the CE repo instead of matching deb.debian.org

Matching the deb.debian.org host made builds behind a different Debian
mirror (Artifactory, apt-cacher-ng, regional mirrors) fail to find the
Debian version of dovecot-core. There are only two sources, so exclude
repo.dovecot.org instead.

* docs: describe the attachment detection setting as a deliberate choice

Mail in cur/ without the S flag is still valid maildir and still
unread, so the explicit empty value is for parity with the Debian
build, not a bug fix. Say so in the config comment and the changelog,
and mention how to enable the feature.

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-11-05 22:47:12 +01:00
Alan Savage bd8b31397a fix(rspamd): pin Rspamd to 4.1.5 and install it from a verified .deb (#4836)
* fix(rspamd): pin Rspamd to 4.1.5 and install it from a verified .deb

The Rspamd apt repo only lists the newest release, so every image build
and rebuild picked up whatever Rspamd had just released. Download the
pinned release from the repo's pool instead and verify its sha256 for
amd64 and arm64. 4.1.5 is the version in Debian testing (forky).

* docs(changelog): link the pull request
2026-11-05 22:34:48 +01:00
Georg Lauterbach 46206aeb89 feat: replace Redis with Valkey (#4808) 2026-09-25 21:56:46 +02:00
Georg Lauterbach 1fb93044c2 feat: remove Xapian (#4786) 2026-09-05 18:55:50 +02:00
beertje44 9aa9366bcb feat: add dovecot-solr (again) (#4782)
Restored default inclusion of dovecot-solr and updated related tutorial. Adjusted Dovecot LDAP configurations and improved permission repair process.
2026-09-04 11:40:11 +02:00
Georg Lauterbach 9e3d15391e chore: remove default Dovecot Flatcurve configuration file (#4760)
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-08-28 17:31:35 +02:00
Georg Lauterbach 2f3a5314f0 feat: add dovecot-flatcurve to installed packages (#4759)
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-08-28 14:31:01 +02:00
Georg Lauterbach 7445d9d7c8 chore: update Fail2Ban to 1.1.1 (#4755)
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-08-28 12:58:14 +02:00
Georg LauterbachandBrennan Kinney c9b015ddc8 chore: update base image from Debian 12 to Debian 13 (#4536)
Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2026-08-19 22:32:02 +02:00
Andreas Perhab cb76075f25 fix: Dockerfile - Build dovecot-fts-xapian package from debian sources (#4700) 2026-05-01 19:30:50 +02:00
Georg Lauterbach a1d1160361 chore: update tools we fetch from GitHub (#4692)
* chore: bump `jaq` from 2.3.0 to 3.0.0
* chore: bump `step-cli` from 0.28.7 to 0.30.2
* chore: formatting

---------

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2026-04-04 19:53:21 +02:00
Georg LauterbachandBrennan Kinney c1da4265d3 chore: apt - Migrate format from .list to .sources (DEB822) (#4556)
* chore: switch to `.sources` layout from `.list`

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>

* chore: update CHANGELOG

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>

* Apply suggestions from code review

---------

Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2025-08-18 12:45:20 +12:00
Georg Lauterbach 9e4749e718 chore: update externally installed software (#4557) 2025-08-17 13:20:21 +02:00
Georg Lauterbach da61eb21a3 chore: Remove Pyzor + Razor packages (#4548) 2025-08-17 11:00:01 +02:00
Jam BalayaandGeorg Lauterbach c1a5eabc94 chore: fix various typos across codebase (#4552)
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2025-08-12 21:55:53 +00:00
Brennan Kinney ea03808c8f fix: packages.sh - Remove Postfix hostname workaround (#4493) 2025-05-27 23:03:10 +02:00
Brennan Kinney d0629f4cb6 chore: Revise utility install scripts + add Smallstep step CLI (#4376)
Changes:
- `jaq` should probably live in `/usr/local/bin` with other third-party sourced binaries.
- `swaks` install properly with just `tar`, no `mv` + `rm` needed.
- Added Smallstep `step` CLI. This serves similar purpose to `openssl` commands, but is generally nicer for usage with generation and inspection of certs/keys. I've talked up using in DMS a few times in the past for our TLS helper and unifying DKIM support (_instead of separate OpenDKIM/Rspamd generators_).
- Including `step` for both AMD64 / ARM64 archs needs the alternate naming convention that it's published to GH releases with.
- Added commentary about the `tar` usage. The ownership is a common concern with GH release sources, technically a non-issue when running as `root`
2025-03-03 22:58:42 +01:00
Brennan Kinney 425d1162ae chore: packages.sh - Bump versions + housekeeping (#4357) 2025-02-13 13:16:31 +01:00
Casper 96bffd7979 chore(compile.sh): Consistent apt-get install command 2024-12-06 21:22:37 +01:00
Brennan Kinney 9f0918c335 fix(packages.sh): swaks --help (#4282)
This command requires the `perl-doc` package to work.
2024-12-07 02:02:35 +13:00
Brennan Kinney d07e6d67d6 chore: Update jaq to 2.0.0 (#4277)
- Bump to [`jaq` v2 release](https://github.com/01mf02/jaq/releases/tag/v2.0.0), artifact naming convention changed.
- Tidied up the changelog a little bit unrelated to this `jaq` update.
- Fixed a typo with an `rspamd.sh` comment + minor revision to the comment.
2024-11-29 16:12:00 +13:00
Georg Lauterbach 94751e00c9 dependency: update jaq from 1.3.0 to 1.6.0 (#4190) 2024-09-21 21:04:06 +02:00
Brennan Kinneyandcasperklein 9175424d0f fix: Update dovecot-fts-xapian to 1.7.13 (#4095)
* fix: Update `dovecot-fts-xapian` to `1.7.13`

Contains a fix to a regression introduced that broke indexing

---------

Co-authored-by: casperklein <casperklein@users.noreply.github.com>
2024-07-03 22:16:02 +12:00
Casper e370c0c96a fail2ban install: remove -k (--insecure) from curl options (#4080) 2024-06-19 18:34:18 +02:00
Casper 18d9d1adcc Fail2ban 1.1.0 (#4045) 2024-06-08 13:43:25 +02:00
Georg Lauterbach 4119849284 update: Dovecot FTS Xapian from 1.5.5 to 1.7.12 (#4034)
* update `compile.sh` and Dovecot FTS Xapian to 1.7.12
  - I updated from 1.5.5. Moreover, I adjusted the script to have what I
consider better style.
* update Dockerfile to use recent updates
* update CHANGELOG
2024-05-25 19:49:45 +02:00
Jiří Štefka 993c7b044f breaking: Drop Dovecot support for Solr (#4025) 2024-05-21 16:49:39 +02:00
Brennan Kinney d86c3cb159 chore: packages.sh - Remove redundant comment (#3900) 2024-02-20 21:21:22 +13:00
Casper 23705e6712 fix: abort when (jaq) curl fails (#3853) 2024-01-30 19:34:26 +13:00
Brennan Kinney 244c455ca1 fix: packages.sh - Download jaq via release tag not latest (#3852)
As the filename includes the version / tag, we cannot rely on the latest URL to be stable.
2024-01-30 11:11:45 +13:00
00018e7e2b general: update base image to Debian 12 ("Bookworm") (#3403)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
2024-01-24 17:05:55 +01:00
Joerg SonnenbergerandBrennan Kinney e3331b0f44 feat: Add MTA-STS support for outbound mail (#3592)
* feat: add support for MTA-STS for outgoing mails

* Hook-up mta-sts-daemon into basic process handling test

* fix: Call python script directly

The python3 shebang will run it, which will now meet the expectations of the process testing via pgrep. fail2ban has the same approach.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-13 21:37:20 +13:00
Georg LauterbachandBrennan Kinney 06fab3f129 tests: streamline tests and helpers further (#3747)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-11 10:34:08 +01:00
Casper aba218e6d7 Fix jaq: Download platform specific binary (#3766)
* choose architecture dynamically
2024-01-10 12:31:30 +13:00
Georg LauterbachandBrennan Kinney 9e81517fe3 tests: Use swaks instead of nc for sending mail (#3732)
See associated `CHANGELOG.md` entry for details.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2024-01-03 13:17:54 +13:00
Peter AdamandPeter Adam 77917f5cc6 scripts: Install arm64 rspamd from official repository (#3686)
* scripts: Install rspamd from official repository instead of debian backports on arm64 architecture

* Remove unnecessary deb-src repository for rspamd

* Remove note about ARM64 rspamd version, update CHANGELOG.md

---------

Co-authored-by: Peter Adam <p.adam@cygnusnetworks.de>
2023-12-07 23:45:02 +01:00
Brennan KinneyandGeorg Lauterbach 19e96b5131 fix: update-check.sh should query GH Releases (#3666)
* fix: Source `VERSION` from image ENV

Now CI builds triggered from tagged releases will always have the correct version. No need for manually updating a separate file.

* fix: Query latest GH release tag

Compare to the remote GH release tag published, rather than contents of a `VERSION` file.

`VERSION` file remains in source for now as prior releases still rely on it for an update notification.

* chore: Switch from `yq` to `jaq`

- Can more easily express a string subslice.
- Lighter weight: 9.3M vs 1.7M.
- Drawback, no YAML input/output support.

If `yq` is preferred, the `v` prefix could be removed via BASH easily enough.

* chore: Add entry to `CHANGELOG.md`

* ci: `VERSION` has no relevance to `:edge`

* docs: Update build guide + simplify `make build`

---------

Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2023-11-30 10:21:26 +13:00
ZepmannandBrennan Kinney 290355cf5a docs: Add Dovecot Lua auth guide + required package (#3579)
* Dovecot: add deb package dovecot-lua to support Lua scripting
* Adding documentation for Lua authentication
* Updated documentation and made a better distinction between Dovecot packages for officially supported features and for community supported features.

---------

Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-11-09 10:18:17 +13:00
Georg Lauterbach 128e6b4d1f chore: Add debug group (packages.sh) + more resilient rspamd setup (#3578) 2023-10-16 09:51:48 +02:00
efed9d8012 Dovecot: compile fts_xapian from source to match Dovecot ABI (#3373)
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
2023-06-01 10:50:31 +02:00
Casper 37ca0f9ba9 Change 'function' style (#3364) 2023-05-26 01:01:41 +02:00
Casper cf74127f78 change if style (#3361) 2023-05-24 09:06:59 +02:00
7af7546d88 feature: adding getmail as an alternative to fetchmail (#2803)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
Co-authored-by: Casper <casperklein@users.noreply.github.com>
2023-05-23 17:25:08 +02:00
Casper 2da3e1b022 fix: SRS setup (#3158) 2023-03-12 12:10:45 +01:00
Brennan KinneyandGeorg Lauterbach 9a9380150e fix: Avoid creating an unnecessary syslog socket for Postfix (#3134)
Co-authored-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com>
2023-03-03 23:08:51 +01:00
Georg LauterbachandBrennan Kinney bee9e3627d rspamd: add feature for adjusting options with a file parsed by DMS (#3059)
Co-authored-by: Brennan Kinney <5098581+polarathene@users.noreply.github.com>
2023-02-19 12:36:43 +01:00