I've fiddled with the config file used to connect to the IMAP server. The options I'm changing are:
IMAP Server - used these address: ssl://imap.gmail.com:993, ssl://imap.gmail.com, imap.gmail.com, and those addresses with googlemail instead of gmail.
TCP port used for IMAP connections: 80...