Can I backup or mirror an IMAP mailbox on Mac OS X? What is the easiest way to create a dump of an IMAP mailbox on a local drive using Mac OS X? 

I would prefer a tool that can mirror an IMAP mailbox's structure to something that creates a massive archive file because the former would be faster and slimmer to do an incremental backup for. But any solution is welcome.
If you're comfortable using Unix tools, a few applications spring to mind:


OfflineIMAP
imapsync
Mailsync


imapsync isn't open source but the others are. You may also find this Ask Different thread useful.