On Mon, Feb 20, 2006 at 06:54:18PM +0200, Timo Sirainen wrote:
On Mon, 2006-02-20 at 16:28 +0100, Gerhard Hofmann wrote:
DiskMan wrote:
To: Gerhard Hofmann Funny you should ask... I just swung my box over from MBOX to MAILDIR and to be honest it works like a top.
I suppose you have used this script http://batleth.sapienti-sat.org/projects/mb2md/ as described in the Dovecot WIKI for the conversion?
BTW. Nowadays Dovecot includes its own conversion tool also, which might work better than mb2md. Usage is something like:
src/plugin/convert-tool user /home/user mbox:/home/user/mail:INBOX=/var/mail/%u maildir:/home/user/Maildir
It converts all mailboxes and you can convert between any two formats. Everything is read and written through Dovecot's normal functions, so it can use existing indexes to speed things up, and it also writes the indexes to destination mailboxes while converting.
convert plugin can also be run as imap/pop3/lda plugin where it converts the mailboxes the first time user logs in or new mail is delivered to user.
After conversion the old mail directory is renamed to mail-converted directory (eg. /home/user/mail -> /home/user/mail-converted).
I'm trying to manually run today's CVS of convert-tool on a Solaris 9 system (a system where I'm successfully running Dovecot itself). Here's an example of what I'm trying:
./convert-tool bozo /home/bozo
mbox:/home/bozo/Mail/:INBOX=/home/bozo/.inbox maildir:/home/bozo/Maildir
When I run this in a case where ~bozo/.inbox *does* exist, but ~bozo/Mail does *not*, then convert-tool displays "Info: Successfully converted." In this case, however, ~bozo/Maildir is created with the cur,new,tmp infrastructure for INBOX, but it's otherwise empty.
When I run this in a case where both ~bozo/Mail and ~bozo/.inbox exist, I receive the error:
Fatal: flock() locks not supported (see lock_method setting in config file)
In this case, ~bozo/Maildir has the empty infrastructure for INBOX and also an empty infrastructure for the first folder in ~bozo/Mail. I'm also left with a stale ~bozo/.dovecot.convert.lock file
I *am* selecting fcntl in dovecot.conf, but convert-tool doesn't appear to be reading the config file. If I want to use convert-tool as a command-line utility, do I need to run it through the master dovecot program in some way?
Attached is truss output, in case it helps.
Thanks, Glenn