Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chatmail: IMAP METADATA (RFC 5464) extension support #290

Open
s0ph0s-dog opened this issue Feb 16, 2025 · 2 comments
Open

Chatmail: IMAP METADATA (RFC 5464) extension support #290

s0ph0s-dog opened this issue Feb 16, 2025 · 2 comments

Comments

@s0ph0s-dog
Copy link
Contributor

This is part of a series of issues tracking chatmail support in Mox.

Chatmail servers support push notifications for iOS and Android through a work around that requires the cooperation of the mail server. Delta Chat clients set push notification tokens by using the IMAP SETMETADATA command to inform the server what the notification token is. The server then sends a POST request to notifications.delta.chat which includes the notification token in the body. The notifications service then uses the Apple or Google push notification APIs to prod client devices to wake up and check for new emails. Delta Chat also looks at another metadata key to see if the server provides an Iroh relay for real-time P2P message passing in WebXDC applications.

In order to enable this functionality, Mox needs support for the RFC 5464 IMAP METADATA extension. This will require support for all of the behaviors described in the specification, but it also requires enough programmatic extension points for other parts of Mox to react when metadata keys are set or read.

@mjl-
Copy link
Owner

mjl- commented Feb 17, 2025

I'll give implementing IMAP METADATA a try this week!

mjl- added a commit that referenced this issue Feb 17, 2025
this allows setting per-mailbox and per-server annotations (metadata). we have
a fixed maximum for total number of annotations (1000) and their total size
(1000000 bytes). this size isn't held against the regular quota for simplicity.
we send unsolicited metadata responses when a connection is in the idle
command and a change to a metadata item is made.

we currently only implement the /private/ namespace.  we should implement the
/shared/ namespace, for mox-global metadata annotations.  only the admin should
be able to configure those, probably through the config file, cli, or admin web
interface.

for issue #290
@mjl-
Copy link
Owner

mjl- commented Feb 17, 2025

The commit just now is the first part. It only allows setting/getting annotations in the /private/* namespace. I think you'll need a way for an admin to set /shared/* annotations too, and let users read it. Not sure where to put those values: config file, or a database file with access through cli and/or admin page. Multiline values in the config file are annoying, I suspect a database file would be better.

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

No branches or pull requests

2 participants