docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec postfix-mailcow postmap -q user@example.com /opt/postfix/conf/sql/virtual_alias_maps.cf

Category: Mail Servers & Postfix

docker compose -f /opt/mailcow-dockerized/docker-compose.yml exec postfix-mailcow postmap -q user@example.com /opt/postfix/conf/sql/virtual_alias_maps.cf

Query a Mailcow SQL alias map directly

postmap -q looks up one key in a map file, here asking the virtual_alias_maps SQL map where mail to user@example.com is redirected. It runs the same SQL query Postfix would run, so it proves the map and database connection work. Use it before blaming aliases for a delivery problem.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.