[Dovecot] dsync: convert only mbox in /var/mail to maildir?
Timo Sirainen
tss at iki.fi
Sat Apr 21 00:27:59 EEST 2012
On 20.4.2012, at 22.26, Jeff Simmons wrote:
> I'm migrating an old UW pop server to a new Dovecot server. The old server did
> not allow mail to be stored on the server, so only mbox files exist in
> /var/mail, with nothing in /home/$user. I'd like to copy the /var/mail
> directory over to the new server and then use dsync to convert the mbox files
> and put them in /home/$user/Maildir, but every permutation of the command line
> I've tried dies with a variation on can't find/write either /var/mail/mail or
> /home/$user/mail, seems it won't deal with mbox files without an associated
> mail directory. Can dsync be used for this kind of conversion, or should I
> look elsewhere for conversion utilities?
Assuming in destination server the mbox is in /var/mail/$user and you want the destination to ~/Maildir:
in dovecot.conf set:
mail_location = maildir.~/Maildir
rm -rf /tmp/emptydir
dsync mirror mbox:/tmp/emptydir:/var/mail/$user
be sure to delete the emptydir between users.
More information about the dovecot
mailing list