Skip to content

chore: merge chatmail/filtermail into chatmail/relay to have a monorepo - #1023

Closed
missytake wants to merge 169 commits into
mainfrom
merge-filtermail
Closed

chore: merge chatmail/filtermail into chatmail/relay to have a monorepo#1023
missytake wants to merge 169 commits into
mainfrom
merge-filtermail

Conversation

@missytake

@missytake missytake commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This is a proposal to merge chatmail/filtermail and chatmail/relay into one monorepo, so we can change filtermail with only one PR in the future.

The paths in the filtermail commits have been rewritten so that they were always in the filtermail/ subdirectory, so the commit history of each file is preserved. What I did to merge the repositories, in case it needs to be repeated slightly differently:

cd $USER/code/relay/..
git clone https://github.com/chatmail/filtermail
cd filtermail
git filter-repo --to-subdirectory filtermail --tag-rename v:filtermail-
cd ../relay
git checkout main
git pull --rebase
git checkout -b merge-filtermail
git remote add filtermail-merge ../filtermail
git fetch filtermail-merge
git merge --allow-unrelated-histories filtermail-merge/main

Then I did 3cf3937 on top of it to integrate filtermail's .github/ and .gitignore into chatmail/relay.

open questions:

  • how should we distinguish tags? does filtermail still need its own software versions? Other projects import filtermail, afaik. I renamed the filtermail tags from v1.2.3 to filtermail-1.2.3 for now, but didn't push them so far.
  • should we rename the relay tags as well, from 1.2.3 to relay-1.2.3?

@j-g00da

j-g00da commented Jul 26, 2026

Copy link
Copy Markdown
Collaborator

does filtermail still need its own software versions?

In theory it does not, but then we probably want to tag relay more often, as it won't be possible to deploy relay from main if filtermail changed without compiling it locally.

Comment thread .github/workflows/filtermail-ci.yml Fixed
Comment thread .github/workflows/filtermail-ci.yml Fixed
Comment thread .github/workflows/filtermail-ci.yml Fixed
Comment thread .github/workflows/filtermail-ci.yml Fixed
Comment thread .github/workflows/filtermail-release.yml Fixed
Comment thread .github/workflows/filtermail-release.yml Fixed
@missytake
missytake force-pushed the merge-filtermail branch 3 times, most recently from f6fb60e to b8ff1b1 Compare July 29, 2026 12:48

@j4n j4n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this, two non-inline comments:

  • ci.yaml still polls the old filtermail release, adapt that to the build pattern from filtermail-ci.yaml.
  • Changelog: There are now two and two cliff.toml; needs some --include-path work so this won't clobber.

Re versioning: prefixed filtermail-X.Y.Z tags, with relay staying unprefixed, seems the conventional shape; I would not retroactively rename relay's tags to relay-X.Y.Z as it breaks existing release-download URLs.

Comment thread .github/workflows/filtermail-release.yml Outdated
Comment thread .github/workflows/filtermail-release.yml Outdated
Comment thread .github/workflows/filtermail-release.yml
Comment thread .github/workflows/filtermail-release.yml
Comment thread .github/workflows/filtermail-release.yml
Comment thread .github/workflows/filtermail-release.yml Outdated
Comment thread .github/workflows/filtermail-release.yml
Comment thread .github/workflows/filtermail-ci.yml Outdated
Comment thread .github/workflows/filtermail-ci.yml
Comment thread filtermail/Cargo.toml Outdated
Comment thread cmdeploy/src/cmdeploy/mtail/filtermail.mtail
Comment thread .github/workflows/filtermail-release.yml Fixed
@missytake

missytake commented Aug 12, 2026

Copy link
Copy Markdown
Contributor Author

CI requires chatmail/cmlxc#31 I think - edit: apparently not, it's green :)

@missytake
missytake requested a review from j4n August 12, 2026 11:40

@j4n j4n left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes looks good. Some more comments inline.

One thing for a followup-PR: RELEASE.md is currently relay-only and should have a filtermail section, something like:

# Releasing chatmail relay
...

# Releasing filtermail

filtermail is versioned independently and released from the same repo,
using `filtermail-` prefixed tags. To release filtermail 0.7.5:

1. Update the changelog:
   `git cliff --config filtermail/cliff.toml -u -t filtermail-0.7.5 -p filtermail/CHANGELOG.md`
2. Bump `version` in `filtermail/Cargo.toml` and commit `filtermail/Cargo.lock`.
3. Commit with the message `feat(release): prepare filtermail for 0.7.5`;  or chore() if it should be excluded from relay changelog.
4. Open a PR with the new commit, merge it to main after review.
5. In the web interface, create a GitHub release, tell it to create a new tag `filtermail-0.7.5`. Do not push the tag by hand: the release must exist before the upload job runs.
6. Bump the pinned version and sha256sums in`cmdeploy/src/cmdeploy/filtermail/deployer.py`.

Comment thread .github/workflows/ci.yaml Outdated
cd repo/filtermail && RUSTFLAGS="-Ctarget-feature=+crt-static -Clink-self-contained=yes" cargo build --release --target x86_64-unknown-linux-musl
cmlxc init
# single cmdeploy relay test
cmlxc -v deploy-cmdeploy --source ./repo cm0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
cmlxc -v deploy-cmdeploy --source ./repo cm0
cmlxc -v deploy-cmdeploy --source ./repo --filtermail repo/filtermail/target/x86_64-unknown-linux-musl/release/filtermail cm0

if we do build filtermail at all times, we should probably also use it in the test, otherwise we dont need to build it; though we will have a path clash here that will need fixing in cmlxc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread .github/workflows/ci.yaml Outdated
Comment thread .github/workflows/ci.yaml Outdated
Comment thread cliff.toml
Comment thread filtermail/cliff.toml
Comment thread .github/workflows/chatmaild-ci.yml Outdated
Comment thread .github/workflows/filtermail-ci.yml
Comment thread filtermail/README.md
Filtermail is distributed as a statically linked linux binary,
available for `x86_64` and `aarch64` architectures.

Binaries are available on the [releases page](https://github.com/chatmail/filtermail/releases).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to be updated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, how do we want to distribute binaries? Maybe https://download.delta.chat/filtermail? I couldn't see a way to filter github.com/chatmail/relay/releases by tag prefix :/ searching for ?q=tag:1.12.0 matches one release, but ?q=tag:1.1 matched none

Comment thread .github/workflows/filtermail-release.yml
Comment thread .github/workflows/filtermail-release.yml Outdated
j-g00da and others added 14 commits August 18, 2026 12:21
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.62.49 to 2.66.7.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@44c6d64...542ceba)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.66.7
  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>
Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.0 to 6.0.1.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@08c6903...8e8c483)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 6.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 2.0.17 to 2.0.18.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@2.0.17...2.0.18)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-version: 2.0.18
  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>
Bumps [Swatinem/rust-cache](https://github.com/swatinem/rust-cache) from 2.8.1 to 2.8.2.
- [Release notes](https://github.com/swatinem/rust-cache/releases)
- [Changelog](https://github.com/Swatinem/rust-cache/blob/master/CHANGELOG.md)
- [Commits](Swatinem/rust-cache@f13886b...779680d)

---
updated-dependencies:
- dependency-name: Swatinem/rust-cache
  dependency-version: 2.8.2
  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>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 6d653acede28d24f02e3cd41383119e8b1b35921 to f7ccc83f9ed1e5b9c81d8a67d7ad1a747e22a561.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](dtolnay/rust-toolchain@6d653ac...f7ccc83)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Prevents extraction failing on SRS.

Fixes: #9

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
j-g00da and others added 22 commits August 18, 2026 12:21
Add information about workers,
and synchronization of deliveries.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Adds max worker capacity of 500 to the worker pool,
and an automatic shutdown of idle workers.
Messages that would cause the capacity to be exceeded,
are deferred.

Additionally, ensures that the same worker
is not spawned by two tasks at the same time.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Logs for filtermail-transport changed in v0.7.2+.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@df4cb1c...9c091bb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Logs mailer-daemon messages separately from other unencrypted mails.

Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.81.10 to 2.82.2.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@7a79fe8...9e1e580)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.82.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>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from 3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 to fa04a1451ff1842e2626ccb99004d0195b455a88.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](dtolnay/rust-toolchain@3c5f7ea...fa04a14)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: 67ef31d5b988238dd797d409d6f9574278e20537
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Otherwise only the first case is built.
Signed-off-by: Jagoda Ślązak <jslazak@jslazak.com>
Bumps [hyper](https://github.com/hyperium/hyper) from 1.9.0 to 1.10.1.
- [Release notes](https://github.com/hyperium/hyper/releases)
- [Changelog](https://github.com/hyperium/hyper/blob/master/CHANGELOG.md)
- [Commits](hyperium/hyper@v1.9.0...v1.10.1)

---
updated-dependencies:
- dependency-name: hyper
  dependency-version: 1.10.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>
Bumps [taiki-e/install-action](https://github.com/taiki-e/install-action) from 2.82.5 to 2.83.1.
- [Release notes](https://github.com/taiki-e/install-action/releases)
- [Changelog](https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md)
- [Commits](taiki-e/install-action@bffeee2...2ca9b94)

---
updated-dependencies:
- dependency-name: taiki-e/install-action
  dependency-version: 2.83.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>
Bumps [dtolnay/rust-toolchain](https://github.com/dtolnay/rust-toolchain) from fa04a1451ff1842e2626ccb99004d0195b455a88 to 2c7215f132e9ebf062739d9130488b56d53c060c.
- [Release notes](https://github.com/dtolnay/rust-toolchain/releases)
- [Commits](dtolnay/rust-toolchain@fa04a14...2c7215f)

---
updated-dependencies:
- dependency-name: dtolnay/rust-toolchain
  dependency-version: 2c7215f132e9ebf062739d9130488b56d53c060c
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@missytake

Copy link
Copy Markdown
Contributor Author
  1. Bump the pinned version and sha256sums incmdeploy/src/cmdeploy/filtermail/deployer.py.

Hm, I added it - but this means we again need 2 PRs until filtermail changes arrive in cmdeploy? Wasn't this the purpose of this PR, that this is simpler now, e.g. by building filtermail in cmdeploy if there are changes?

@j-g00da

j-g00da commented Aug 18, 2026

Copy link
Copy Markdown
Collaborator

but this means we again need 2 PRs until filtermail changes arrive in cmdeploy? Wasn't this the purpose of this PR, that this is simpler now, e.g. by building filtermail in cmdeploy if there are changes?

Yes I brought up this topic on a group chat some time ago. If we don't come up with a way to do this in one PR, then I don't really see any benefit of merging the repos. In fact it IMO only makes things more confusing.

@missytake

Copy link
Copy Markdown
Contributor Author

but this means we again need 2 PRs until filtermail changes arrive in cmdeploy? Wasn't this the purpose of this PR, that this is simpler now, e.g. by building filtermail in cmdeploy if there are changes?

Yes I brought up this topic on a group chat some time ago. If we don't come up with a way to do this in one PR, then I don't really see any benefit of merging the repos. In fact it IMO only makes things more confusing.

Hm, the options I see:

  • stop having filtermail releases, and using the main branch instead:
    • a) We can build filtermail from source during cmdeploy run. (this is basically what we do with chatmaild.)
    • b) We could have a github action which builds filtermail and uploads it to https://download.delta.chat/filtermail on pushes to main which change the filtermail/ directory.
      • Any PR would need to update the sha256sum in cmdeploy, a github action or git hook could take care we don't forget it.
  • c) keep it as it is.

What do you think? I think I prefer option b).

@j-g00da

j-g00da commented Aug 19, 2026

Copy link
Copy Markdown
Collaborator

I think a) won't work as IIRC we don't want to force users to build it locally. I like option b), but then what do we want to do with version string, ideally we would auto-bump it on each change.

Alternative, (let's call it "d)") I had in mind was to use the latest available binary or build from source if there were any changes in filtermail subdir. This way we can still build filtermail only when tagging relay, but if someone doesn't mind building from source - they can use main branch.

I'm fine with either b) or d) whichever seems simpler.

@hpk42

hpk42 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

this filtermail/relay merging all turned into pretty much of a quagmire 😅 Considering that we actually want to go for a new single-file installer i don't think it's worth to spend our collective time on this PR any further, i am afraid. I don't have easy answers to some of the questions above, and also think that if "single-PR" changes of both relay and filtermail don't become reliably and somewhat easily possible, we don't win much.

So i suggest for now to close this PR, and stay with the two-repo solution until we get more clarity on the single-file installer layout/changes. Sorry for triggering this two-repo merge early on without thinking it through, and thanks Nami and all for engaging.

@missytake

missytake commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

Sounds good to me :)

@missytake missytake closed this Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants