This by itself makes me believe this is doomed.
Part of the problem with IMAP is that it's incredibly complex. That complexity, and differing interpretations of that complexity, is a huge part of what makes IMAP such a headache to deal with.
Simplicity is a virtue. Don't add everything you can think of, strip out everything you don't absolutely have to have. It's fine if the protocol is extensible, but your first and primary goal should be to have a system that synchronizes email reliably and efficiently. Get that right, then start worrying about the extra stuff. Until then, you're just making life harder.