Skip to main content

IMAP

PyPI Python Downloads

IMAP lets Arbiter read and manage configured mailboxes through policy-scoped operations. Operators own the IMAP connection settings, credentials, folder metadata, folder access policy, message-operation policy, flag policy, and delete behavior. Agents can discover and use the allowed mailbox operations, but they do not provide IMAP credentials or transport settings.

Operations

OperationUse
imap:list_foldersList policy-accessible folders.
imap:search_foldersSearch policy-accessible folder names and metadata.
imap:list_messagesList messages in a folder.
imap:search_messagesSearch messages in a folder.
imap:get_messageRead one message and its attachment inventory.
imap:get_attachmentMaterialize one attachment as an Arbiter artifact when HTTP artifact delivery is available.
imap:move_messageMove a message to an allowed destination.
imap:delete_messageDelete a message, normally by moving it to TRASH.
imap:mark_message_readMark one message read or unread.
imap:get_message_flagsInspect message flags allowed by policy.
imap:update_message_flagsAdd or remove message flags allowed by policy.
imap:append_messageAppend a message to an allowed folder.
imap:save_draftSave a draft message to the account's Drafts folder.

Use

Inspect the plugin and an operation:

arbiter plugins imap
arbiter op desc imap:list_messages

Inspect an account before using it:

arbiter plugins imap account bot

List folders, then list messages in one folder:

arbiter op run imap:list_folders --args '{
"account": "bot",
"recursive": false,
"limit": 10
}'

arbiter op run imap:list_messages --args '{
"account": "bot",
"folder": "INBOX",
"limit": 10
}'

Read a returned message id:

arbiter op run imap:get_message --args '{
"account": "bot",
"folder": "INBOX",
"message_id": "42"
}'

More

  • Configure: account, folder metadata, and policy setup.
  • Behavior: folder overlays, message ids, attachments, flags, and delete-to-trash behavior.
  • Reference: schemas, policy gates, config checks, and live checks.