When I'm at work I set up a secure TCP tunnel, using SSH, to the IMAP port on my Linux box at home. This enables me to access my personal e-mail both from work and from home. All messages are stored in mbox format on my Linux box.
If I send personal e-mail when I'm at work I use the SMTP server of my employer, although I could set up another secure TCP tunnel to the SMTP port on my computer at home if I wanted that.
The IMAP port on my Linux box is blocked for access outside my local network at home, so security flaws in the IMAP server is not an issue.
When I'm at work I set up a secure TCP tunnel, using SSH, to the IMAP port on my Linux box at home. This enables me to access my personal e-mail both from work and from home. All messages are stored in mbox format on my Linux box.
If I send personal e-mail when I'm at work I use the SMTP server of my employer, although I could set up another secure TCP tunnel to the SMTP port on my computer at home if I wanted that.
The IMAP port on my Linux box is blocked for access outside my local network at home, so security flaws in the IMAP server is not an issue.
This solution works just fine for me.