[Dovecot] Migrating mailboxes

Odhiambo Washington odhiambo at gmail.com
Wed Jan 9 16:02:04 EET 2013


Hello everyone and Happy 2013!

I have a situation -- the first ever I have come across -- which I don't
understand.

A friend was/is running Postfix and Dovecot - with default configs -
nothing was ever changed :-)

[root at mail home]# dovecot --version
0.99.11

Anyway, he had a problem with a user mailbox which I wasn't able to
diagnose and fix easily. maillog showed:
Jan  9 16:11:29 mail imap-login: Login: userx [::ffff:127.0.0.1]
Jan  9 16:11:29 mail imap(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))
Jan  9 16:11:29 mail dovecot: child 25217 (imap) killed with signal 6
Jan  9 16:12:03 mail imap-login: Login: userx [::ffff:127.0.0.1]
Jan  9 16:12:03 mail imap(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))
Jan  9 16:12:03 mail dovecot: child 25229 (imap) killed with signal 6
Jan  9 16:13:15 mail pop3-login: Login: userx [::ffff:192.168.0.55]
Jan  9 16:13:15 mail pop3(userx): file lib.c: line 37 (nearest_power):
assertion failed: (num <= ((size_t)1 << (BITS_IN_SIZE_T-1)))

My aim is not to fix the above.
I have reconfigured both Postfix and Dovecot to use Maildir now and things
are fine (not securitywise, but I don't care about that) for now.
However, I'd like to migrate old mail for some users, but I don't know how
to go about this, given the mailbox format, which I don't understand:
Here is what a typical one looks like:

[root at mail home]# ls -al johndoe/mail/.imap/
total 24
drwx------  6 johndoe users 4096 May 27  2010 .
drwx------  3 johndoe users 4096 May 27  2010 ..
drwx------  2 johndoe users 4096 May 27  2010 Drafts
drwx------  2 johndoe users 4096 Jan  9 15:46 INBOX
drwx------  2 johndoe users 4096 May 27  2010 Sent
drwx------  2 johndoe users 4096 May 27  2010 Trash
[root at mail home]# ls -al johndoe/mail/.imap/INBOX/
total 180
drwx------  2 johndoe users   4096 Jan  9 15:46 .
drwx------  6 johndoe users   4096 May 27  2010 ..
-rw-------  1 johndoe users      5 Dec 18  2007 .customflags
-rw-------  1 johndoe users  10272 Jan  9 15:46 .imap.index
-rw-------  1 johndoe users 132774 Jan  9 11:27 .imap.index.data
-rw-------  1 johndoe users   5136 Sep 26  2011 .imap.index.log
-rw-------  1 johndoe users   9404 Jan  8 18:44 .imap.index.tree
[root at mail home]# ls -al johndoe/mail/.imap/Sent/
total 36
drwx------  2 johndoe users  4096 May 27  2010 .
drwx------  6 johndoe users  4096 May 27  2010 ..
-rw-------  1 johndoe users     5 May 27  2010 .customflags
-rw-------  1 johndoe users  1608 May 27  2010 .imap.index
-rw-------  1 johndoe users 10264 May 27  2010 .imap.index.data
-rw-------  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw-------  1 johndoe users  1556 May 27  2010 .imap.index.tree
[root at mail home]# ls -al johndoe/mail/.imap/Drafts/
total 36
drwx------  2 johndoe users  4096 May 27  2010 .
drwx------  6 johndoe users  4096 May 27  2010 ..
-rw-------  1 johndoe users     5 May 27  2010 .customflags
-rw-------  1 johndoe users  1608 May 27  2010 .imap.index
-rw-------  1 johndoe users 10264 May 27  2010 .imap.index.data
-rw-------  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw-------  1 johndoe users  1556 May 27  2010 .imap.index.tree
[root at mail home]# ls -al johndoe/mail/.imap/Trash/
total 44
drwx------  2 johndoe users  4096 May 27  2010 .
drwx------  6 johndoe users  4096 May 27  2010 ..
-rw-------  1 johndoe users     5 May 27  2010 .customflags
-rw-------  1 johndoe users  1608 May 27  2010 .imap.index
-rw-------  1 johndoe users 17950 May 27  2010 .imap.index.data
-rw-------  1 johndoe users  2576 May 27  2010 .imap.index.log
-rw-------  1 johndoe users  1556 May 27  2010 .imap.index.tree

How can I migrate these mails into /home/johndoe/Maildir/ ?? They don't
seem like mbox to me so mb2md.pl doesn't seem to apply here..





-- 
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
I can't hear you -- I'm using the scrambler.


More information about the dovecot mailing list