Example: Receive IMAP Folders
This example shows the IMAP receive path for a live mailbox.
Use this when MailAtlas should connect to a mailbox, fetch selected folders, and store messages locally. If you already have .eml files or an mbox archive on disk, use file ingest instead.
Password auth
Section titled “Password auth”export MAILATLAS_HOME="$PWD/.mailatlas"export MAILATLAS_IMAP_HOST=imap.example.comexport MAILATLAS_IMAP_USERNAME=user@example.comexport MAILATLAS_IMAP_PASSWORD=app-password
mailatlas receive --provider imap --folder INBOXOAuth token auth
Section titled “OAuth token auth”export MAILATLAS_HOME="$PWD/.mailatlas"export MAILATLAS_IMAP_HOST=imap.example.comexport MAILATLAS_IMAP_USERNAME=user@example.comexport MAILATLAS_IMAP_ACCESS_TOKEN=oauth-access-token
mailatlas receive --provider imap --folder INBOXMailAtlas consumes the access token at runtime but does not manage IMAP OAuth login, refresh, or token storage.
Foreground polling
Section titled “Foreground polling”mailatlas receive watch --provider imap --folder INBOX --interval 60Use watch when you want the local workspace to stay current while the process is running.
Inspect results
Section titled “Inspect results”mailatlas listmailatlas get <document-id>Received IMAP documents use source_kind: "imap" and include IMAP folder and UID provenance when available.
Next step
Section titled “Next step”- Use IMAP Receive for the complete guide.
- Use Workspace Model to understand cursor state.
- Use Security and Privacy before sharing a workspace.