Skip to content

Conversation

@erikj79
Copy link
Member

@erikj79 erikj79 commented Nov 21, 2025

The OpenJDK mail archive will move to Mailman 3 at some point in the future. To prepare for that, Skara needs to be made Mailman 3 compatible, specifically for reading emails from the archive to be able to publish them as comments in PRs. There are two major changes

1. REST API

The REST API for reading mbox archives is different. It's a lot better in Mailman3. Instead of having to read in fixed monthly chunks, we can request a custom date interval. The data is also returned gzipped instead of in plain text. To retain backwards compatibility, I chose to implement the Mailman 2 and 3 support as subclasses with some shared implementation. This caused a lot of mechanical changes in tests, just updating method names or signatures since the API for creating a Mailman server object changes. It also forced some cleanup in bots where MailmanServer objects were created unnecessarily. I updated some tests to use the Mailman3 implementation where possible to exercise the new code more.

The new implementation is not taking advantage of the new capabilities in the API, so there is some inefficiency with polling for updates. We may need to revisit this and improve.

2. Mbox format

The format of the mail bodies in the returned mbox format is quite different. It's now MIME encoded and can be encoded in a few different ways ("7bit", "8bit" and "quoted-printable" have been observed so far). I've tried to implement support for decoding all the ways I've so far observed.

Some examples of this patch in action can be found in openjdk/playground#246. Note that the earlier comments have problems that eventually got resolved as I ironed out the details.

An observation I've made is that the new server introduces hard line breaks in emails as they are archived. Those are visible already when browsing the archive. I'm not sure if this is a setting in Mailman itself or not. Those line breaks are not part of the email I received when subscribing to a list, just in the archive, and so also in any comments posted by Skara.

This is a big patch, so sorry in advance.


Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace

Issue

  • SKARA-2610: Mailman 3 support (Enhancement - P2)

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/skara.git pull/1743/head:pull/1743
$ git checkout pull/1743

Update a local copy of the PR:
$ git checkout pull/1743
$ git pull https://git.openjdk.org/skara.git pull/1743/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 1743

View PR using the GUI difftool:
$ git pr show -t 1743

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/skara/pull/1743.diff

@bridgekeeper
Copy link

bridgekeeper bot commented Nov 21, 2025

👋 Welcome back erikj! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link

openjdk bot commented Nov 21, 2025

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk openjdk bot changed the title 2610 2610: Mailman 3 support Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant