I wrote a
script that can help out with this, somewhat. It, in essence, does a copy from an IMAP folder to a maildir folder. I use it to keep my Gmail backed up locally, in case of emergency, but it should be able to download multiple mailboxes/users with some creative looping.
That said, since you've already got filesystem-level access to the mail (and are, presumably, using maildir), rsync would do an even better job of moving the mail.
_________________
Code:
/* TODO: need to add signature to posts */