On Friday, April 20, 2012 02:27:59 pm Timo Sirainen wrote: > 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
Actually: dsync mirror mbox:/tmp/emptydir:INBOX=/var/mail/$user :) And be sure that /var/mail/$user has the same ownership:group as the user (i.e. $user:$user NOT $user:mail). > be sure to delete the emptydir between users. -- Jeff Simmons j...@j-simmons.net Simmons Consulting - Network Engineering, Administration, Security