Host *
ControlMaster auto
ControlPersist yes
ControlPath /tmp/ssh-%r@%h:%p
ServerAliveInterval 600
So now you type in your password for your first session only, and every other session will be slaved to it (this includes directory/file auto completion over ssh in zsh and other nice nibbles like it does with public/private key pairs).
You can just setup your account in for example OSX Mail, after synchronizing your messages will be in ~/Library/Mail (albeit not in a really nice folder structure like pure mbox or maildir, but you should be able to convert them without much hassle). Or you could use offlineimap (http://www.offlineimap.org), which gives you an IMAP dump/backup of your messages (in maildir format if I'm not mistaken). That said, the possibilities of getting your mail from IMAP are almost endless, just choose whatever suits you.
Btw, keeping 20000 mails just about anywhere might be convenient, but I really wonder what for (to clarify, I have maybe 300 mails right now on my own server and I regularly dump old stuff, while dumping for example registration mails right away due to security reasons)?