DBMail should make every effort to limit damage, including:
The installation directions should also recommend:
iptables -A OUTPUT -m owner --uid-owner dbmail -p tcp --dport 143 -j ACCEPT iptables -A OUTPUT -m owner --uid-owner dbmail -p tcp --sport 143 -j ACCEPT iptables -A OUTPUT -m owner --uid-owner dbmail -j DROP