Meh..nevermind. I made a stupid error in the config file. I put my domain instead of hostname in the host section. I guess it was trying to go out to the intarweb only to come back to the box to try and login to the imap server...which is not allowed. My IMAP server is setup only to allow connections internally (ie: localhost).