[Dovecot] Re: mbox to maildir conversion - good idea regarding
Outlook?
Glenn Leavell
glenn at usg.edu
Mon Mar 13 19:35:00 EET 2006
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
-------------- next part --------------
execve("convert-tool", 0xFFBFF7B4, 0xFFBFF7CC) argc = 5
resolvepath("/usr/lib/ld.so.1", "/usr/lib/ld.so.1", 1023) = 16
open(".", O_RDONLY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
close(3) = 0
open("./..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
getdents64(3, 0xFFBFC468, 8192) = 400
close(3) = 0
open("./../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
getdents64(3, 0xFFBFC468, 8192) = 856
close(3) = 0
open("./../../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
getdents64(3, 0xFFBFC468, 8192) = 1416
close(3) = 0
open("./../../../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
getdents64(3, 0xFFBFC468, 8192) = 8192
close(3) = 0
open("./../../../../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
getdents64(3, 0xFFBFC468, 8192) = 8184
close(3) = 0
open("./../../../../../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3
fstat64(3, 0xFFBFEEA8) = 0
open("/etc/mnttab", O_RDONLY|O_LARGEFILE) = 4
read(4, " /", 1) = 1
ioctl(4, MNTIOC_NMNTS, 0xFFBFC3F0) = 0
fstat(4, 0xFFBFC368) = 0
ioctl(4, MNTIOC_GETDEVLIST, 0xFFBFC250) = 0
read(4, " d e v / m d / d s k / d".., 929) = 929
close(4) = 0
lstat64("/home", 0xFFBFC2B8) = 0
close(3) = 0
lstat64("/home/glenn/dovecot/src/plugins/convert", 0xFF3F0478) = 0
resolvepath("/home/glenn/dovecot/src/plugins/convert/convert-tool", "/home/glenn/dovecot/src/plugins/convert/convert-tool", 1023) = 52
stat("/home/glenn/dovecot/src/plugins/convert/convert-tool", 0xFFBFF588) = 0
open("/var/ld/ld.config", O_RDONLY) Err#2 ENOENT
stat("/usr/local/lib/libiconv.so.2", 0xFFBFF090) = 0
resolvepath("/usr/local/lib/libiconv.so.2", "/usr/local/lib/libiconv.so.2.1.0", 1023) = 32
open("/usr/local/lib/libiconv.so.2", O_RDONLY) = 3
mmap(0x00010000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_ALIGN, 3, 0) = 0xFF3A0000
mmap(0x00010000, 983040, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF280000
mmap(0xFF280000, 886342, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF280000
mmap(0xFF368000, 26416, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 884736) = 0xFF368000
munmap(0xFF35A000, 57344) = 0
memcntl(0xFF280000, 40772, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/libsocket.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/libsocket.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libsocket.so.1", "/usr/lib/libsocket.so.1", 1023) = 23
open("/usr/lib/libsocket.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 114688, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF380000
mmap(0xFF380000, 39550, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF380000
mmap(0xFF39A000, 4333, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 40960) = 0xFF39A000
munmap(0xFF38A000, 65536) = 0
memcntl(0xFF380000, 13792, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/libnsl.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/libnsl.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libnsl.so.1", "/usr/lib/libnsl.so.1", 1023) = 20
open("/usr/lib/libnsl.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 712704, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF180000
mmap(0xFF180000, 578962, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF180000
mmap(0xFF21E000, 32788, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 581632) = 0xFF21E000
mmap(0xFF228000, 22800, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) = 0xFF228000
munmap(0xFF20E000, 65536) = 0
memcntl(0xFF180000, 82376, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/librt.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/librt.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/librt.so.1", "/usr/lib/librt.so.1", 1023) = 19
open("/usr/lib/librt.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 98304, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF260000
mmap(0xFF260000, 21378, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF260000
mmap(0xFF276000, 1736, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 24576) = 0xFF276000
munmap(0xFF266000, 65536) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF250000
memcntl(0xFF260000, 9364, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/libsendfile.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/libsendfile.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libsendfile.so.1", "/usr/lib/libsendfile.so.1", 1023) = 25
open("/usr/lib/libsendfile.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 81920, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF160000
mmap(0xFF160000, 1800, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF160000
mmap(0xFF172000, 348, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 8192) = 0xFF172000
munmap(0xFF162000, 65536) = 0
memcntl(0xFF160000, 1212, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/libc.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/libc.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libc.so.1", "/usr/lib/libc.so.1", 1023) = 18
open("/usr/lib/libc.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 802816, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF080000
mmap(0xFF080000, 701788, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF080000
mmap(0xFF13C000, 24664, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 704512) = 0xFF13C000
munmap(0xFF12C000, 65536) = 0
memcntl(0xFF080000, 117372, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/local/lib/libc.so.1", 0xFFBFF090) Err#2 ENOENT
stat("/usr/lib/libdl.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libdl.so.1", "/usr/lib/libdl.so.1", 1023) = 19
open("/usr/lib/libdl.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00002000, 8192, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF3FA000
mmap(0xFF3FA000, 1894, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3FA000
close(3) = 0
stat("/usr/lib/libmp.so.2", 0xFFBFF090) = 0
resolvepath("/usr/lib/libmp.so.2", "/usr/lib/libmp.so.2", 1023) = 19
open("/usr/lib/libmp.so.2", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 90112, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF060000
mmap(0xFF060000, 10804, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF060000
mmap(0xFF074000, 849, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 16384) = 0xFF074000
munmap(0xFF064000, 65536) = 0
memcntl(0xFF060000, 2464, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/lib/libaio.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libaio.so.1", "/usr/lib/libaio.so.1", 1023) = 20
open("/usr/lib/libaio.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 106496, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF040000
mmap(0xFF040000, 32673, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF040000
mmap(0xFF058000, 1752, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 32768) = 0xFF058000
munmap(0xFF048000, 65536) = 0
memcntl(0xFF040000, 6796, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
stat("/usr/lib/libmd5.so.1", 0xFFBFF090) = 0
resolvepath("/usr/lib/libmd5.so.1", "/usr/lib/libmd5.so.1", 1023) = 20
open("/usr/lib/libmd5.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
mmap(0x00010000, 81920, PROT_NONE, MAP_PRIVATE|MAP_NORESERVE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFF020000
mmap(0xFF020000, 5864, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF020000
mmap(0xFF032000, 456, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 8192) = 0xFF032000
munmap(0xFF022000, 65536) = 0
memcntl(0xFF020000, 1268, MC_ADVISE, MADV_WILLNEED, 0, 0) = 0
close(3) = 0
mmap(0x00000000, 8192, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_ANON, -1, 0) = 0xFF010000
stat("/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1", 0xFFBFEDA0) = 0
resolvepath("/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1", "/usr/platform/sun4u-us3/lib/libc_psr.so.1", 1023) = 41
open("/usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1", O_RDONLY) = 3
mmap(0xFF3A0000, 8192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_FIXED, 3, 0) = 0xFF3A0000
close(3) = 0
getustack(0xFFBFF3CC)
getrlimit(RLIMIT_STACK, 0xFFBFF3C4) = 0
getcontext(0xFFBFF200)
setustack(0xFF143A5C)
sysconfig(_CONFIG_SEM_VALUE_MAX) = 2147483647
time() = 1142271166
brk(0x00091E68) = 0
brk(0x00097E68) = 0
uname(0xFFBFF160) = 1
getpid() = 20087 [20086]
open64("/dev/urandom", O_RDONLY) = 3
read(3, "E5 u16E2", 4) = 4
fcntl(3, F_GETFD, 0x00000000) = 0
fcntl(3, F_SETFD, 0x00000001) = 0
lstat64("/home/bozo/Mail", 0xFFBFF438) = 0
time() = 1142271166
lstat64("/home/bozo/.dovecot.convert.lock", 0xFFBFF320) Err#2 ENOENT
stat64("/home/bozo/.temp.hermes.20087.9faaf5d122012c3e", 0xFFBFF288) Err#2 ENOENT
open64("/home/bozo/.temp.hermes.20087.9faaf5d122012c3e", O_RDWR|O_CREAT|O_EXCL, 0666) = 4
write(4, " 2 0 0 8 7 : h e r m e s", 12) = 12
link("/home/bozo/.temp.hermes.20087.9faaf5d122012c3e", "/home/bozo/.dovecot.convert.lock") = 0
unlink("/home/bozo/.temp.hermes.20087.9faaf5d122012c3e") = 0
fstat64(4, 0xFFBFF3B8) = 0
close(4) = 0
stat64("/home/bozo/.dovecot.convert.lock", 0xFFBFF528) = 0
lstat64("/home/bozo/Mail", 0xFFBFF438) = 0
lstat64("/home/bozo/Maildir//cur", 0xFFBFF2E0) Err#2 ENOENT
mkdir("/home/bozo/Maildir//cur", 0770) Err#2 ENOENT
mkdir("/home/bozo/Maildir/", 0770) = 0
mkdir("/home/bozo/Maildir//cur", 0770) = 0
lstat64("/home/bozo/Maildir//new", 0xFFBFF2E0) Err#2 ENOENT
mkdir("/home/bozo/Maildir//new", 0770) = 0
lstat64("/home/bozo/Maildir//tmp", 0xFFBFF2E0) Err#2 ENOENT
mkdir("/home/bozo/Maildir//tmp", 0770) = 0
brk(0x00097E68) = 0
brk(0x00099E68) = 0
brk(0x00099E68) = 0
brk(0x0009BE68) = 0
open("/home/bozo/Mail/", O_RDONLY|O_NDELAY|O_LARGEFILE) = 4
fstat64(4, 0xFFBFF3E0) = 0
fcntl(4, F_SETFD, 0x00000001) = 0
getdents64(4, 0x00098110, 8192) = 1952
stat64("/home/bozo/Mail//AR", 0xFFBFF448) = 0
mkdir("/home/bozo/Maildir/.AR", 0770) = 0
mkdir("/home/bozo/Maildir/.AR/cur", 0770) = 0
mkdir("/home/bozo/Maildir/.AR/new", 0770) = 0
mkdir("/home/bozo/Maildir/.AR/tmp", 0770) = 0
stat64("/home/bozo/Maildir/dovecot-shared", 0xFFBFF4B8) Err#2 ENOENT
stat64("/home/bozo/Mail/AR", 0xFFBFF4B8) = 0
mkdir("/home/bozo/Mail/.imap/AR", 0770) Err#17 EEXIST
stat64("/home/bozo/Mail/.imap/AR", 0xFFBFF340) = 0
time() = 1142271166
open64("/home/bozo/Mail/.imap/AR/dovecot.index", O_RDWR) Err#2 ENOENT
time() = 1142271166
open64("/home/bozo/Mail/.imap/AR/dovecot.index.log", O_RDWR) = 5
fstat64(5, 0xFFBFEEB8) = 0
pread64(5, "01\0\018 D15A11F\0\0\001".., 24, 0) = 24
alarm(120) = 0
fstat64(2, 0xFFBFEA78) = 0
Fatal: write(2, " F a t a l : ", 7) = 7
flock() locks not supported (see lock_method setting in config file)write(2, " f l o c k ( ) l o c k".., 68) = 68
write(2, "\n", 1) = 1
_exit(89)
More information about the dovecot
mailing list