docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm force-resync -u user@example.com INBOX

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec dovecot-mailcow doveadm force-resync -u user@example.com INBOX

Rebuild the index for a corrupted mailbox

force-resync drops Dovecot's index and cache files for the given mailbox and rebuilds them from the maildir on disk. Use it when IMAP shows phantom messages, wrong counts, or messages that cannot be opened. The underlying mail is untouched.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.