Commit Graph

1477 Commits

Author SHA1 Message Date
Jagoda Estera Ślązak ec0413bd5f feat: Log disabled recipients (#113)
Logs disabled recipient addresses
when removing them from RCPT TO.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-15 22:00:42 +02:00
j4n 2bdfecff72 cmdeploy: consolidate container detection into is_in_container() helper 2026-04-15 16:33:52 +02:00
j4n cef739e3b3 cmdeploy/sshexec: remove dead @docker SSH host
@docker is no longer needed because we use @local inside the container now.
2026-04-15 16:33:52 +02:00
j4n 3d128d3c64 test: add dovecot deployer checks
Offline tests (test_dovecot_deployer.py, 5 tests):
- skips_epoch_matched_install: core epoch bug regression
- uses_archive_version_for_url_and_filename: epoch must not leak into URLs
- skips_dpkg_path_when_epoch_matched: end-to-end no-op deploy path
- unsupported_arch_falls_back_to_apt: integrated apt fallback with
  mixed changed results to verify |= accumulation
- pick_url_falls_back_on_primary_error: URL failover

Online test (test_1_basic.py):
- dovecot_main_process_matches_installed_binary: stale-binary
  regression guard: checks /proc/PID/exe is not deleted and
  status text matches dovecot --version
2026-04-15 15:46:03 +02:00
j4n 79f68342f4 fix: dovecot epoch version and stale-binary handling
Restart dovecot after package replacement even when `policy-rc.d` blocks
package-triggered restarts, avoid reinstalling already-correct packages.

Adds proper version separation for dovecot packages:
- Split DOVECOT_VERSION into DOVECOT_ARCHIVE_VERSION (for URLs/filenames)
  and DOVECOT_PACKAGE_VERSION (epoch-prefixed for dpkg matching).
- Update _download_dovecot_package() to return (path, changed) tuple
  so install() can track whether packages triggered restart intent.
- Use self.need_restart |= changed consistently throughout deployer.
- Move self.need_restart = True inside `if debs:` block -- previously
  the apt pin file write unconditionally forced a restart every deploy.
- Comment on dpkg retry pattern (first dpkg may fail on missing deps,
  apt-get --fix-broken resolves, then dpkg retries).

Authored-by: Alex V. <119082209+Retengart@users.noreply.github.com>

fixup
2026-04-15 15:46:03 +02:00
Alexandre Gauthier 54863453c2 fix(cmdeploy): Set permissions on dovecot pin
Ensure the preferences.d snippet that pins dovecot packages to block
Debian dist-upgrades is owned by root:root and has 644 permissions.

Files in this directory are generally expected to be world readable to ensure unprivileged operations such as apt-get in simulation mode. Having them not world readable breaks such usages.
2026-04-10 15:52:49 +02:00
Jagoda Estera Ślązak 2450d1d9c7 docs(readme): Reformat README.md (#115)
Fixes: #91

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-09 11:27:48 +02:00
Jagoda Estera Ślązak 74326a8c54 feat(nginx): Route /mxdeliv/ to configurable port (#901) 2026-04-08 19:11:11 +02:00
holger krekel 59e5dea597 fix: make "cmdeploy test --config ..." work, without requiring or implicitely falling back to a "chatmail.ini" in parent dirs 2026-04-08 19:05:51 +02:00
holger krekel d7d89d66c1 fix: properly terminate and wait on subprocesses on teardown 2026-04-08 19:05:51 +02:00
holger krekel 00d723bd6e refactor: deployer improvements (VM detection, mailboxes dir ensured to be there, proper unbound on ipv4) 2026-04-08 19:05:51 +02:00
holger krekel c257bfca4b feat: update chatmail-turn to support private addresses 2026-04-08 19:05:51 +02:00
holger krekel 82c9831369 refactor: unify DNS zone-file to standard BIND format 2026-04-08 19:05:51 +02:00
Jagoda Estera Ślązak 0feb1371b3 chore(dependabot): Update configuration (#114)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-07 13:53:48 +02:00
Jagoda Estera Ślązak b835318ce9 chore(deps): Upgrade to filtermail 0.6.1 (#910)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-07 12:48:40 +02:00
dependabot[bot] 8ad65923e9 chore(deps): Bump tokio from 1.50.0 to 1.51.0 (#111)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.50.0 to 1.51.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.50.0...tokio-1.51.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.51.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 12:46:59 +02:00
dependabot[bot] 5575df7510 chore(deps): Bump taiki-e/install-action from 2.69.13 to 2.71.2 (#112)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.69.13 to 2.71.2.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/704f92c11daa75bff5b4e01fcb083350c16c47b9...d858f8113943481093e02986a7586a4819a3bfd6)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.71.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-07 12:46:10 +02:00
Jagoda Estera Ślązak 0f58942998 chore(release): prepare for 0.6.1 (#109)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-01 23:21:32 +02:00
Jagoda Estera Ślązak 05cbf2908c feat: Add experimental option to disable mailboxes (#108)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-04-01 23:05:02 +02:00
j4n b4a46d23e6 fix(cmdeploy): pin dovecot packages to prevent apt upgrades
As our .deb packages use Debian's version naming scheme, deploy an apt
preferences file that sets Pin-Priority: -1 for all dovecot-* packages
for every version of dovecot-* from every origin.
2026-03-31 17:12:30 +02:00
dependabot[bot] 621eaeeffb chore(deps): Bump taiki-e/install-action from 2.69.4 to 2.69.13 (#107)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.69.4 to 2.69.13.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/a7e592b24782184db1613493a5e65d2e12199f80...704f92c11daa75bff5b4e01fcb083350c16c47b9)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.69.13
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 09:46:08 +02:00
dependabot[bot] ca3393cf48 chore(deps): Bump env_logger from 0.11.9 to 0.11.10 (#106)
Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.11.9 to 0.11.10.
- [Release notes](https://github.com/rust-cli/env_logger/releases)
- [Changelog](https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rust-cli/env_logger/compare/v0.11.9...v0.11.10)

---
updated-dependencies:
- dependency-name: env_logger
  dependency-version: 0.11.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 09:45:50 +02:00
dependabot[bot] a4497bc10d chore(deps): Bump dtolnay/rust-toolchain (#105)
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from efa25f7f19611383d5b0ccf2d1c8914531636bf9 to 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](https://github.com/dtolnay/rust-toolchain/compare/efa25f7f19611383d5b0ccf2d1c8914531636bf9...3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 09:45:24 +02:00
DarkCat09 c6d9d27a84 fix(deps): add rpc server to cmdeploy along with client 2026-03-29 16:02:24 +00:00
DarkCat09 4521f03c99 fix: remove duplicate deps from cmdeploy 2026-03-29 13:52:08 +00:00
DarkCat09 c78859aec6 fix(deps): add aiosmtpd to testenv 2026-03-29 13:52:08 +00:00
DarkCat09 98bd5944cc chore(deps): remove unused deps from chatmaild 2026-03-29 13:52:08 +00:00
Jagoda Estera Ślązak fb77c5be81 feat(resolver): Enable DNSSEC (#94)
From hickory-resolver docs:
> To enable DNSSEC, enable the dnssec-ring feature.

Related: https://github.com/chatmail/relay/issues/877
Related: https://github.com/hickory-dns/hickory-dns/issues/3519
Closes: https://github.com/chatmail/filtermail/issues/93

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-24 08:27:48 +01:00
link2xt e8933c455f fix: set default smtp_tls_security_level to "verify" unconditionally
This change was accidentally added in cf96be2cbb
Relay should not stop validating TLS certificates of other relays
just because it has a self-signed or externally managed certificate.
Externally managed certificate is likely to even be valid.
2026-03-23 19:52:49 +00:00
dependabot[bot] 7da0c34678 chore(deps): Bump taiki-e/install-action from 2.68.20 to 2.69.4 (#102)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.68.20 to 2.69.4.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/4a136ceac97fe29b942ff3b6c749a46c7950d853...a7e592b24782184db1613493a5e65d2e12199f80)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.69.4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-23 10:11:12 +01:00
link2xt d3a483c403 feat(postfix): prefer IPv4 in SMTP client 2026-03-22 21:05:02 +00:00
j4n e687120d96 fix(cmdeploy): Install dovecot .deb packages atomically
Since change 635ac7 we try to install Dovecot, even if it is already
running, which fails Dovecot upgrades fail when the installed version
differs from the target because dovecot-imapd/lmtpd dependencies
on dovecot-core: packages are installed one at a time via apt.deb(),
i.e. `dpkg -i`, and dpkg cannot satisfy them dependencies:
```
  dpkg: dependency problems prevent configuration of dovecot-imapd:
    dovecot-imapd depends on dovecot-core (= 1:2.3.21+dfsg1-3); however:
      Version of dovecot-core on system is 1:2.3.21.1+dfsg1-1~bpo12+1.
```

Split _install_dovecot_package into _download_dovecot_package (download
only, return path) and a single server.shell call that passes all .deb
files to dpkg -i together. Uses the same 3-step pattern as pyinfra's
apt.deb: tolerant first dpkg -i, apt-get --fix-broken, then final
dpkg -i to fail if there are still errors.
2026-03-21 16:17:37 +01:00
373[Ø]™ 7409bd3452 Merge pull request #898 from chatmail/373/decom-cron
chore(cmdeploy): stop installing cron package
2026-03-19 10:55:36 +00:00
ccclxxiii 1a34172487 chore(cmdeploy): stop installing cron package 2026-03-18 20:35:27 +00:00
j4n 38246ca8ea feat(cmdeploy): Add blocked_service_startup() context manager
Prevent services from auto-starting during package installation by
installing a policy-rc.d that exits 101. This avoids dovecot startup
failures when no TLS cert exists yet (e.g. acmetool failed on first run).

Picked out of 62fe113b from hpk/lxcdeploy branch.
2026-03-17 14:28:11 +01:00
j4n 2635ac7e6d fix(cmdeploy): Rewrite dovecot install logic, update
The old code did not install updates when the service was running; check
installed version instead of systemd status. Also, rewrite install logic
to extract dovecot version and hashes as module-level constants.
Use blocked_service_startup from lxcdeploy branch as it solves our
problem here too.
2026-03-17 14:28:11 +01:00
holger krekel 4fabfb31f8 fix test and some linting fixes 2026-03-16 13:25:57 +01:00
Andrey 0xdc09 9a4a54cea8 refactor: derive Default for Envelope (#100) 2026-03-16 10:01:52 +01:00
Andrey 0xdc09 2aa894f48f docs(readme): fix typo (#99)
As suggested in https://github.com/chatmail/filtermail/pull/84#issuecomment-4056084708
2026-03-16 08:49:50 +01:00
dependabot[bot] 23b28bc66e chore(deps): Bump Swatinem/rust-cache from 2.8.2 to 2.9.1 (#96)
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.8.2 to 2.9.1.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](https://github.com/swatinem/rust-cache/compare/779680da715d629ac1d338a641029a2f4372abb5...c19371144df3bb44fab255c43d04cbc2ab54d1c4)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.9.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 10:29:54 +01:00
dependabot[bot] b47b859fcb chore(deps): Bump actions/download-artifact from 8.0.0 to 8.0.1 (#95)
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 8.0.0 to 8.0.1.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3...3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-14 10:28:29 +01:00
Jagoda Ślązak 36478dbfcf feat(filtermail): Disable IP verification on domain-literal addresses
Disables IP verification by upgrading filtermail to v0.6,
changelog: <https://github.com/chatmail/filtermail/releases/tag/v0.6.0>

Messages using domain-literal addresses no longer require
to match the origin SMTP connection IP anymore.

This allows for example a relay using IPv4 email addresses
to send messages to other relays over IPv6.

This is not considering a breaking change as IP-address-only
relays are not considered a stable feature.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-13 20:47:10 +01:00
Andrey 0xdc09 49df79bfa0 feat: configurable hosts for listen and reinject (#84)
Adds configurable listen IP and postfix host 
via `filtermail_host` and `postfix_host` chatmail.ini config fields.
2026-03-13 17:04:44 +01:00
Jagoda Estera Ślązak b31e13a417 chore(release): prepare for 0.6.0 (#92)
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-13 12:51:38 +01:00
Jagoda Estera Ślązak 8dd9436a0d feat!: Remove IP verification for domain-literals (#90)
BREAKING CHANGE: messages using domain-literal
  addresses don't require to match the origin
  SMTP connection IP anymore.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-13 12:25:45 +01:00
Jagoda Estera Ślązak 82a9850a4b docs(readme): Improve README.md (#88)
Fixes #85

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-12 18:15:08 +01:00
Jagoda Estera Ślązak 779e7ca2b4 docs(readme): Clarify licensing of the binaries
Co-authored-by: holger krekel  <holger@merlinux.eu>
2026-03-11 19:00:56 +01:00
Jagoda Ślązak 0d7f5d7b05 docs(readme): Fix license link
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
2026-03-11 18:04:14 +01:00
dependabot[bot] 07496abab4 chore(deps): Bump tokio from 1.49.0 to 1.50.0 (#86)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.49.0 to 1.50.0.
- [Release notes](https://github.com/tokio-rs/tokio/releases)
- [Commits](https://github.com/tokio-rs/tokio/compare/tokio-1.49.0...tokio-1.50.0)

---
updated-dependencies:
- dependency-name: tokio
  dependency-version: 1.50.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 10:56:32 +01:00
dependabot[bot] a8033b107e chore(deps): Bump taiki-e/install-action from 2.68.13 to 2.68.20 (#87)
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.68.13 to 2.68.20.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/taiki-e/install-action/compare/a3324fb0eb94b8230ec968c3389c1b7929fc2f3b...4a136ceac97fe29b942ff3b6c749a46c7950d853)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.68.20
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-11 10:53:51 +01:00