unable to look up host mail.example.com: Name or service not known
is most likely to be a dns lookup error.
Your "netstat" output does not appear to show any listening dns server, did you configure dns at all? Or are you using name resolution external to that machine?
Do a "cat /etc/resolv.conf" and find out your nameservers. The error above is likely due to the dns servers you are using cannot resolve the name.