Since fail2ban is not the culprit, is there a conflict between SpamAssassin and ISPConfig's firewall?
Thats very unlikely as the ispconfig firewall does not contain any rules for outgoing traffic.
Most likely the system can not reach one or all nameservers that is defined in /etc/resolv.conf. Please check that all nameservers that are listed there are reachable and working. Do not use 127.0.0.1 as nameserver when you have mydns installed. Use external nameservers in that case. With bind you can use 127.0.0.1 as nameserver.