MailGraph supports offline archives, live mail protocols, and synthetic evaluation datasets.
| Provider | Ingestion Mode | Trash / Archive Support | Undo Support | Notes |
|---|---|---|---|---|
| Synthetic Mailbox | Instant generator | Full local support | Full local undo | Ideal for instant evaluation, benchmarks, and automated testing |
| MBOX Archives | Offline streaming | Full local support | Full local undo | Reads Google Takeout, Thunderbird, Apple Mail exports |
| Generic IMAP | TLS SSL / UID-based | Folder MOVE / Copy | Dependent on provider | Compatible with standard IMAP servers; uses BODY.PEEK to preserve unread state |
| Gmail API | OAuth 2.0 Loopback | Trash & Archive APIs | Untrash API | Least-privilege scopes (gmail.readonly initially; gmail.modify only on action) |
The synthetic mailbox generator creates multi-domain, multi-sender, multi-thread test mailboxes deterministically:
- Domains: Corporate (
acme-corp.com), Newsletters (substack.com), Receipts (stripe.com,uber.com,apple.com), Security alerts (accounts.google.com), Notifications (github.com,figma.com), Academic (mit.edu). - Realistic reply chains using RFC822
In-Reply-ToandReferences. - Realistic attachment sizes (
.pdf,.png,.xlsx,.zip) with exact duplicate hash groups.
- Memory-bounded streaming using standard
mailbox.mboxandemail.policy.default. - Fault-tolerant: malformed MIME blocks are isolated and logged without aborting the import.
- Attachment filenames sanitized against directory traversal attacks.
- Scopes: Starts with
https://www.googleapis.com/auth/gmail.readonly. - User consent: Local loopback server (
http://127.0.0.1:28491/api/accounts/gmail/callback). - Secure Token Storage: OS Credential Manager (Windows Credential Locker / macOS Keychain via
keyring). - Deletion: Calls
users.messages.trash, placing messages in the Gmail Trash folder for 30-day recovery.