IMAPLogin() will cause a core dump when the port is
probably when the host is wrong too. MakeConnection()
connect which fails and MakeConnection() returns null.
readTilEOL is called with a NULL.
I used this:
/* connect to port "port" on "host" */
if ((the_connection = MakeConnection(
host.c_str(), port, usessl )) == NULL)
Instead of putting the port number in the server
config, it seems like it would be better to look it up
based on the usessl flag. Of course having the port is
nice if a forwarding mechanism is in place.