So long as MacMail is following the RFC (but since this is an Apple app, there are no guarantees), the server's version is authoritative. The local information is effectively a cache and is not supposed to override the server's store.

(I see the last one often: I use the Exchange IMAP Connector because I prefer Opera's mail client to Outlook. However, the IMAP Connector doesn't play real well with the storage backend and I see messages appear and disappear and re-appear once again when the backend has them replicated properly.)

Wade.