docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm fetch -u user@example.com 'uid text' mailbox INBOX

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm fetch -u user@example.com 'uid text' mailbox INBOX

Print the raw text of every INBOX message

doveadm fetch dumps the requested fields, here UID plus the full message text, for messages in the mailbox. Scope it down with a search, for example 'uid text' mailbox INBOX subject 'invoice', before running on a large mailbox. Output is raw RFC822 content.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.