[ILUG] Script to move Maildir content
Paul Murray
paulinuxmurray at gmail.com
Mon Jul 6 21:58:58 IST 2009
Patrick O'Connor wrote
> I've got a bunch of mails (in Maildir format) to move from one server to
> another. Only problem is that there's lots of them (60 accounts in 5
> different domains, 70GB total). I'm trying to dip my toe in the waters of
> shell scripting but am a bit lost. If anyone can help out I'd be glad to
> provide suitable beverages at the next potd!
>From memory there is a tool in WUImap that does exactly this using the imap
protocol to move email collections from one server to another... its a vague
recollection of it having been mentioned on the courier-mta mailing list a
few years back... a google search might throw it up for you.
You could of course nfs share the folders from the old server to the new and
do a depth first search and cpio -pdm to move them across, something like
this might work
find . -depth -print | cpio -pdm /path/to/target
and with that you won't loose any file attributes etc.
Not a script answer but maybe theres something useful for you there.
Paul.
More information about the ILUG
mailing list