Skip to content

feat: jmap support - part 1#12711

Merged
kesselb merged 1 commit into
mainfrom
feat/jmap-1
Jul 21, 2026
Merged

feat: jmap support - part 1#12711
kesselb merged 1 commit into
mainfrom
feat/jmap-1

Conversation

@SebastianKrupinski

@SebastianKrupinski SebastianKrupinski commented Apr 12, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Resolves: JMAP Protocol Abstraction and Routing Infrastructure #12609
  • Added php-jmap-client dependency
  • Modified test workflow to start additional mail server with jmap support
  • Added jmap specific console command to create account (mail:account:create-jmap)
  • Added jmap specific console command to create account (mail:account:create-jmap)
  • Modified existing imap console command to create account (mail:account:create-imap) with alias to old command (mail:account:create)
  • Modified existing imap console command to update account (mail:account:update-imap) with alias to old command (mail:account:create)
  • Added unified console test command (mail:account:test) with alias to old (mail:account:diagnose)
  • Added a protocol factory to create the correct client and connectors
  • Added database migrations

@SebastianKrupinski SebastianKrupinski self-assigned this Apr 12, 2026
@github-project-automation github-project-automation Bot moved this to 🏗️ In progress in 💌 📅 👥 Groupware team Apr 12, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/jmap-1 branch 2 times, most recently from e01d756 to 234e641 Compare April 12, 2026 23:21
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/jmap-1 branch 4 times, most recently from 961bbd3 to fc4e6c8 Compare April 21, 2026 12:38
@SebastianKrupinski SebastianKrupinski changed the title feat: jmap support - initial feat: jmap support - part 1 Apr 21, 2026
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/jmap-1 branch 9 times, most recently from 8d19aa3 to db410bf Compare April 21, 2026 21:32
@SebastianKrupinski
SebastianKrupinski marked this pull request as ready for review April 21, 2026 21:33
@SebastianKrupinski
SebastianKrupinski force-pushed the feat/jmap-1 branch 8 times, most recently from 9aeb152 to 4f1e284 Compare June 28, 2026 12:34
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

On hold for #12711 (comment)

@ChristophWurst @kesselb

Done. Implemented

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

⚠️ Some of the new files are AGPL-3.0-only but have to be AGPL-3.0-or-later
⚠️ New column remote_id is not indexed but used in WHERE -> full table scan on our biggest table
⚠️ Version is migration class names is outdated
⚠️ php-http/discovery plugin has to be allowed at installation. Change should be committed

Lots of dead code, but it will be used in part 2, ignoring.

Comment thread lib/Command/CreateJmapAccount.php Outdated
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

⚠️ Some of the new files are AGPL-3.0-only but have to be AGPL-3.0-or-later

  • Done, the remaining two files (CreateImapAccount and UpdateImapAccount) where renamed... So the "AGPL-3.0-only" should probably stay

⚠️ New column remote_id is not indexed but used in WHERE -> full table scan on our biggest table

  • Done

⚠️ Version is migration class names is outdated

  • Done

⚠️ php-http/discovery plugin has to be allowed at installation. Change should be committed

  • Done

@ChristophWurst ChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>.

@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. It is recommended that you run composer update or composer update <package name>.

Done

/**
* Synchronize all relevant mailboxes for the account.
*/
public function syncAll(Account $account, bool $force = false): void;

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.

Does that belong here?

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.

Yes, it sync messages for an entire account

json_decode($imapClient->capability->serialize(), true)
);
sort($capabilities);
$output->writeln('Capabilities: <info>' . implode(', ', $capabilities) . '</info>');

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.

The old formatting, using newlines, was much better to read.

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.

You need to run this command on feat/jmap-2, the command is truncated in this PR, because its missing code to make the rest work

sort($capabilities);
$output->writeln('Capabilities: <info>' . implode(', ', $capabilities) . '</info>');

$output->writeln('<info>IMAP connection test passed</info>');

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.

Can we add "Account has $messages messages in $nMailboxes mailboxes" back, why the removal?

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.

You need to run this command on feat/jmap-2, the command is truncated in this PR, because its missing code to make the rest work

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.

image

@ChristophWurst

Copy link
Copy Markdown
Member

@kesselb ready to merge?

Comment thread lib/Contracts/IMailboxConnector.php Outdated
interface IMailboxConnector {

/**
* Synchronise the list of mailboxes for the given account.

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
* Synchronise the list of mailboxes for the given account.
* Synchronize the list of mailboxes for the given account.

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.

Done

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.

Done

Signed-off-by: SebastianKrupinski <krupinskis05@gmail.com>
@kesselb
kesselb merged commit b01aff2 into main Jul 21, 2026
42 of 43 checks passed
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Jul 21, 2026
@kesselb
kesselb deleted the feat/jmap-1 branch July 21, 2026 13:12
@SebastianKrupinski

Copy link
Copy Markdown
Contributor Author

Thank you @kesselb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: ☑️ Done

Development

Successfully merging this pull request may close these issues.

JMAP Protocol Abstraction and Routing Infrastructure

5 participants