e-smith won't accept addresses of foo@localhost, as you've discovered. I'm not sure, though, why you're having the "connect to mydomain.com failed" error. Just for reference, this is how my .fetchmailrc is set up:
poll mail.earthlink.net protocol POP3:
user danb35 is dan@danb.mine.nu
password mypassword;
...where danb.mine.nu is my domain.
From a command line, see what "telnet localhost 25" does--it should connect.