Did you modify iptables or disable docker’s ability to modify iptables?
Docker will add a DOCKER-USER and DOCKER chain to the “filter” table when permitted to, but you can disable that, which subjects your containers to iptables FW rules:
https://docs.docker.com/network/iptables/
Also make sure all your containers are up and running.
docker compose ps
docker ps
Looking more closely at your screenshots, your dovecot container’s health is poor. Did you check the container’s logs as well?
docker compose logs –tail=100 dovecot-mailcow