PIMAP Messaging Server
Client establishes and authenticates a PIMAP session over HTTPS.
It performs an IMAP state comparison for subscribed folders.
Client-originated events (send, delete, etc.) are propagated as requests.
Server uses SMS to notify of server originated events.
Client reacts to notifications if needed (e.g. fetches body of new message) over additional requests. The server maintains (cookie-based) a long-lived session and queues server events, reducing the need for full state comparisons.
If notifications are lost (out of coverage, etc.) the client retrieves pending events when one finally reaches its destination.
It is also possible that the client connects to server without even receiving the SMS. In this case, the server pushes pending events to the client in-band.
3. HTTPS binding, out-band notifications (e.g. SMS)