I appear to have managed to fix the issue, but not by fixing the actual Windows Mobile problem.
The reason I had two different IMAP servers running on one box is that I could never get Dovecot to build with OpenSSL in the past, so I still had to keep UWIMAP around as that was built properly with OpenSSL. I prefer to use Dovecot when I don't need a secure connection as it is so much faster than UW.
So after todays nonsense I decided to try and build Dovecot with OpenSSL again and this time I succeeded. So I can use Dovecot for all my IMAP stuff now.
The did indeed solve the problem, as it doesn't matter which port Windows Mobile connects to now.
_________________________
Remind me to change my signature to something more interesting someday