I have been having the same problem with Mail on Mountain Lion (10.8) and an Exchange 2010 server.
My mailbox stopped receiving mail since I upgraded from Snow Leopard (10.6), I checked the settings and it seems the exchange server address was being replaced by Mail itself to a non sensical xxx.xxx.local address.
I have 3 mailboxes, POP, IMAP and this Exchange account, which I deleted, removed the keychain details for (as suggested in a previous post) and then rentered the Exchange account details. This worked for a day until today I found my Exchange mailbox empty.
Not wishing to use the Exchange webmail client I have carried out the following fix as suggested previously:
Edit your /etc/hosts (open terminal and type: sudo pico /etc/hosts) file and on a new line enter the Exchange server IP address followed by a space then the address of the Exchange server as it keeps being replaced by Mail. In my case this would be:
210.123.123.12 exch-cas01.email.local
You should substitute your details in above. You can find the IP address of your Exchange server by using Terminal again and typing:
dig myexchangeserver.com
somewhere in the output will be your Exchange server IP address.
However apparently this is not a permanent fix, so I have also made a change in the OSX Directory Service, hopefully this will make the fix permanent...
(Thanks to this page for the details: http://tomafro.net/2009/07/dscl-the-easy-way-to-add-hosts-on-osx)
Again, open Terminal and type the following, using the local Exchange address that Mail insists on using and the IP address according to the dig command above or your tech support people. For me the command looks like this, remember to substitute your Exchange server address and IP.
sudo dscl localhost -create /Local/Default/Hosts/exch-cas01.email.local IPAddress 210.123.123.12
and hit Enter. Hopefully that will fix it, I will report back if it doesn't work for me.
Lets hope Apple release a fix soon...
NB: Once you've made the changes above you may get warnings from Mail saying the certificate is invalid, check the certificate details and if they match your Exchange server details then accept them, you can also set the default action to always trust the certificate.