Alan Schmitt said:
I agree with all this, and here the server is "localhost", which is perfectly accessible (at least by telnet). I guess Mail.app developers have not considered this possibility, so they just test for network connectivity instead of access to the server.
Here's another thought, I don't know if mail.app allows you to do this. Evolution allows me to configure a so-called "IMAP command" that is called instead of making a connection to localhost:143 and provides an already authenticated IMAP connection on stdin/out. I've been using a small script that exports a few environment variables and then exec's /usr/lib/dovecot/imap to do exactly this -- no network involved and the best thing is that I don't even need to enter a password for local access.
johannes