Mailcow comes with its own resolver (Unbound), which resolves DNS queries recursively. That works behind the DDoS protection too. But DNS traffic is rate limited per destination IP, and during an attack the public resolvers get priority (see Name Servers - What to Keep in Mind). Mailcow can run into DNS errors then.
If that happens, you can have Unbound forward queries to public resolvers. Add this to the end of /opt/mailcow-dockerized/data/conf/unbound/unbound.conf:
forward-zone:
name: "."
forward-addr: 1.1.1.1
forward-addr: 8.8.8.8
Then restart the Unbound container:
cd /opt/mailcow-dockerized
docker compose restart unbound-mailcow
Some DNS blocklists such as Spamhaus don't answer queries that come in through public resolvers, so spam filtering may get worse with this forwarding.