1. Keep-Alive HTTP binding, in-band notifications
PIMAP Messaging Server
Client establishes and authenticates a PIMAP session over a long-lived HTTPS request. It performs an IMAP state comparison for subscribed folders.
It uses this request to propagate client-originated events (send, delete, etc.)
Server uses long-lived response to notify of server originated events.
Server receives notifications from the Message Store in different ways:
Message Store has notification rules capabilities and can actively notify the PIMAP dispatcher
PIMAP dispatcher opens an IDLE session to the Message Store in behalf of the user
Client reacts to notifications if needed (e.g. fetches body of new message)
If request/response ends, server maintains session and queues events.
Client re-establishes HTTPS request within session lifetime and retrieves events without the need for a full state comparison.