Did you tried this from your server
echo "test mail." | mail -s Test name@mydomain.com
Also make sure that your hostname is a fully qualified domain.
try
hostname
hostname -i
hostname should resolve or point correctly to IP shown by hostname -i(main IP)
Also check that the MX record of mydomain.com and make sure that its using local mail server.