Not knowing anything about exim, some ideas:
1. Is /usr/bin/sendmail linked to exim? If you have fooled around with installing different MTAs, it may not be.
2. What do your mail logs say?
3. Can you successfully invoke /usr/sbin/sendmail from the command line? Like so:
Code:
$ /usr/sbin/sendmail -t -i
To: me@example.net
From: me@myexamplelinode.com
Subject: a test
this is a test
^D
4. If #3 works, can you also do it as the user that is having trouble sending mail (e.g., on Debian/Ubuntu, Apache runs as the www-data user)?
5. Your hosts file almost certainly has nothing to do with things.