Mobile/Projects/PushImapProxy: Difference between revisions

Jump to navigation Jump to search
Line 25: Line 25:


==== Server ====
==== Server ====
The server receives user credentials (login information, address of imap server) and two push endpoints from the email app. It then logs into the imap server with the credentials and starts monitoring the user's inbox for new mail.
Inbox monitoring is done using the IDLE extension to the IMAP protocol where available. The server thus sends an IDLE message and waits for EXISTS messages from the IMAP server, which mean new mail has arrived. Following the recommendation in RFC 2177, the server also restarts idling (that is, sends a DONE and then a new IDLE messages) periodically to prevent disconnects.
Upon detecting new mail, the server sends a push notification through one of the endpoints it received from the app. The other endpoint is used to notify the app that the connection with the IMAP server has been lost; the app should then re-send user credentials so another IMAP session can be started.
* Supports 1M users
* Supports 1M users
* Drop credentials immediately after user
* Drop credentials immediately after use
* Prototype: https://github.com/dougt/go-push-mail-proxy
* Prototype: https://github.com/dougt/go-push-mail-proxy


10

edits

Navigation menu