Skip to content

[RFC] IMAP NOTIFY "support"#314

Open
d-javu wants to merge 2 commits intolefcha:masterfrom
d-javu:notify
Open

[RFC] IMAP NOTIFY "support"#314
d-javu wants to merge 2 commits intolefcha:masterfrom
d-javu:notify

Conversation

@d-javu
Copy link

@d-javu d-javu commented Mar 16, 2026

I've made a first cut at IMAP NOTIFY support.

It works for me, at least sometimes, other times it returns early, and end up in a tight loop.

It is largely modeled on the included IMAP IDLE implementation, and provides a await_notification() Lua function.

Where enter_idle sends DONE / IDLE on timeout, await_notification sends NOOP requests.

I'm making this pull request to get feedback on the direction.

The Lua is copied from enter_idle and probably needs a good looking at.

@d-javu
Copy link
Author

d-javu commented Mar 16, 2026

My problems seem to come from a bad implementation of NOTIFY in the server I have tested with. It looks like a bit of research is necessary to find out the least common denominator for the command syntax that can be used, or a series of fallbacks to appease the lesser capable NOTIFY implementations.

I've even come across a server that announces the NOTIFY extension, accepts the NOTIFY command, but does not give out any notifications.

For this reason, it might be prudent to give more control to the user than I have done so far. The NOTIFY command syntax is complicated, what level of 'expertise' can we demand from the users should we go down this route?

Alternatively, we can provide a series of fallbacks, but at that point we might be better off just offering IMAP IDLE support, as it currently is.

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.

1 participant