This function marks the selected mail messages as deleted.
required | string or string The email account's name. account=_mainaccount@example.com account=example account=user@example.com |
mailbox required | string The mailbox to operate on. Note:
Example: mailbox=INBOX.user@example_com |
query required | string The Dovecot query to execute. Note: The query parameter prevents accidental removal of all messages in the mailbox. For more information, read Dovecot's Search Query documentation. Example: query=savedbefore 52w |
uapi --output=jsonpretty \ --user=username \ Mailboxes \ expunge_mailbox_messages \ account='_mainaccount@example.com' \ mailbox='INBOX.user@example_com' \ query='savedbefore 52w'
{- "apiversion": 3,
- "func": "expunge_mailbox_messages",
- "module": "Mailboxes",
- "result": {
- "data": null,
- "errors": null,
- "messages": null,
- "metadata": { },
- "status": 1,
- "warnings": null
}
}