docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec mysql-mailcow mysql -u mailcow -p mailcow -e 'SELECT COUNT(*) AS q FROM quarantine;'

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec mysql-mailcow mysql -u mailcow -p mailcow -e 'SELECT COUNT(*) AS q FROM quarantine;'

Count quarantined messages in the database

This runs a direct SQL query against the mailcow database, here counting rows in the quarantine table. Useful to confirm the quarantine really is empty after a purge. The password in -p matches the one stored in mailcow.conf.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.