Jeff Simmons
2012-Apr-20 19:26 UTC
[Dovecot] dsync: convert only mbox in /var/mail to maildir?
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? Thanks for helping a noob who can't traverse a wiki without leaving a trail of breadcrumbs. -- Jeff Simmons jeff at j-simmons.net Simmons Consulting - Network Engineering, Administration, Security
Timo Sirainen
2012-Apr-20 21:27 UTC
[Dovecot] dsync: convert only mbox in /var/mail to maildir?
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.
Reasonably Related Threads
- Error using dsync to convert really old mboxes to Maildir and workaround
- Dsync ignores INBOX when converting from mbox to maildir
- dsync mbox to maildir migration does not delete, deleted e-mails
- Convert standalone mbox to standalone Maildir with Dsync - hierarchy separator error
- dsync: mbox to maildir