When I needed to do some fancy footwork with my IMAP and POP servers, I found perdition.
It was a little surprising at first - would it really work?? The quick answer is YES - it worked incredibly well.
What does it do, you ask? It is an IMAP and POP proxy, which comes in handy for having only one IP address, and several different back-end IMAP servers. Its useful for a whole lot more, but that's what I use it for.
So if you are wondering if you should give perdition a try, feel free to take my very positive into consideration.