We could probably invent an IMAP extension for that. Once Dovecot supports it, plenty of open source webmail solutions can then also support it.
I've thought about doing this very thing! But given all the other interesting projects I have/want to work in domains I'm actually familiar with, this is one that I'll leave to an expert.