As far as console clients go Mew does very well with imap, in fact more reliably than most of the gui clients I've tried. It happily pulled down multi-GB Gmail mailboxes and kept them in sync without any issues, has sane disconnected-mode behavior, handled network failures well, etc. It's implemented inside emacs, but you don't have to be a heavy emacs user to use it and one of the vi-emulation modes might help if not. Built-in ssh tunneling support; good support for mime, pgp, s/mime; and pluggable search options were what convinced me. It depends on stunnel for ssl/tls, but I'm happy they're not reimplementing support. The manual could use some work, but it's relatively extensive.
https://github.com/kazu-yamamoto/Mew http://www.mew.org/en/info/release/