1- So you don't think it has to do with the DNS? I edit the host.conf file to add www.mydomain.com
192.168.1.2 and it works. The problem is that I can't do this with the windows machines that I have on the network, because many of them are laptops that need to access internet from other networks when people are travelling.
2- I can receive email correctly now (still have the problem where I need to specify the IP if I am inside of my network and if I go outside of the network, I need to change it to the server1.mydomain.com), but can't send email. I did a telnet on port 25 and sent an email through SMTP commands and it worked fine. This was inside my network. Now if I am outside the network, with my laptop, I cannot telnet to port 25 at all. Why is that? Router port is open and the linux firewall port is also open.