← Back to Research

Overview

Real-time delivery status, read receipts, and bidirectional communication at the protocol level.

Problem Statement

Current SMTP is fire-and-forget: - No real-time delivery confirmation - Bounce messages are delayed and unreliable - Read receipts are client-dependent (easily disabled) - No typing indicators or presence

Goals

  1. Real-time delivery notifications via WebSocket/Server-Sent Events
  2. Protocol-level read receipts (not client-dependent)
  3. Message status updates (queued, delivered, read, expired)
  4. Optional: Presence indicators (typing, online status)

Architecture

Sender MTA                msgs.global               Recipient MTA
    |                          |                          |
    |---MAIL FROM------------->|                          |
    |<--250 Accepted-----------|                          |
    |                          |---RCPT TO--------------->|
    |                          |<--250 OK-----------------|
    |                          |                          |
    | WebSocket connection     |                          |
    |<========={status updates}|                          |
    |   "queued"               |                          |
    |   "delivered"            |<--DSN (delivered)--------|
    |   "read"                 |<--Read receipt-----------|

Features

1. Status Channel

{
  "message_id": "abc123@msgs.global",
  "status": "delivered",
  "timestamp": "2026-03-07T20:00:00Z",
  "recipient": "user@example.com",
  "details": {
    "mta": "mx1.example.com",
    "latency_ms": 234
  }
}

2. Read Receipts (Server-Enforced)

IMAP Extension: SEEN flag triggers server-side read receipt

3. Presence (Optional)

{
  "user": "recipient@example.com",
  "status": "online",
  "client": "webmail",
  "last_seen": "2026-03-07T19:58:00Z"
}

Integration with msgs.global

Backend

  • Flask WebSocket endpoint for status updates
  • IMAP plugin for read receipt triggers
  • Postfix plugin for delivery events
  • PostgreSQL for event tracking

API Endpoints

GET  /api/v1/messages/:id/status - Get message status
WS   /api/v1/messages/stream     - Real-time updates
POST /api/v1/messages/:id/receipt - Manual read receipt

Webmail Integration

  • Live delivery tracking UI
  • Read receipt visualization
  • Optional typing indicators

Privacy Considerations

  • Users can disable read receipts (privacy setting)
  • Presence is opt-in
  • Status tracking requires sender authorization

Status

📋 Research Phase

Next Steps

  1. Design WebSocket protocol
  2. IMAP SEEN flag monitoring
  3. Postfix delivery event hooks
  4. Build status dashboard UI