how silly of me :-( that was the problem indeed.
Now I get this: Host imap.gmail.com says it has NO CAPABILITY for AUTHENTICATE CRAM-MD5
I then tried --authmech2 PLAIN and after that failed too --authmech2 LOGIN
- none works. Anyone knows what authmech to try with GMAIL's IMAP servers?