[Dovecot] Migrating mailboxes
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@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@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@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@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@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@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.
On 2013-01-09 9:02 AM, Odhiambo Washington odhiambo@gmail.com wrote:
[root@mail home]# dovecot --version 0.99.11
Ummm... seriously?
Your assignment, should you choose to accept it (or not), is to upgrade dovecot (and possibly if you have a similarly ancient/unsupported version of it too).
There is simply no, that is ZERO excuse for continuing to use this version of dovecot...
On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus CMarcus@media-brokers.comwrote:
On 2013-01-09 9:02 AM, Odhiambo Washington odhiambo@gmail.com wrote:
[root@mail home]# dovecot --version 0.99.11
Ummm... seriously?
Your assignment, should you choose to accept it (or not), is to upgrade dovecot (and possibly if you have a similarly ancient/unsupported version of it too).
There is simply no, that is ZERO excuse for continuing to use this version of dovecot...
So true. However, I will let them run it unless they pay for upgrade.
At this moment in time, I only need to figure out how to migrate the mails which were in /home/USER/mail to /home/USER/Maildir/
Any clues?
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
I can't hear you -- I'm using the scrambler.
On 01/09/2013 09:24 AM, Odhiambo Washington wrote:
So true. However, I will let them run it unless they pay for upgrade.
At this moment in time, I only need to figure out how to migrate the mails which were in/home/USER/mail to /home/USER/Maildir/
Any clues? Let's see some more details, what's under there, what format is it in, what IMAP server was managing it.
On Wed, Jan 9, 2013 at 5:29 PM, Gedalya gedalya@gedalya.net wrote:
On 01/09/2013 09:24 AM, Odhiambo Washington wrote:
So true. However, I will let them run it unless they pay for upgrade.
At this moment in time, I only need to figure out how to migrate the mails which were in */home/USER/mail to /home/USER/Maildir/*
Any clues?
Let's see some more details, what's under there, what format is it in, what IMAP server was managing it.
I have listed everything.
IMAP server == Dovecot 0.9.whatever.I.posted.earlier:-)
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
I can't hear you -- I'm using the scrambler.
Am 09.01.2013 15:24, schrieb Odhiambo Washington:
On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus CMarcus@media-brokers.comwrote:
On 2013-01-09 9:02 AM, Odhiambo Washington odhiambo@gmail.com wrote:
[root@mail home]# dovecot --version 0.99.11
Ummm... seriously?
Your assignment, should you choose to accept it (or not), is to upgrade dovecot (and possibly if you have a similarly ancient/unsupported version of it too).
There is simply no, that is ZERO excuse for continuing to use this version of dovecot...
So true. However, I will let them run it unless they pay for upgrade.
At this moment in time, I only need to figure out how to migrate the mails which were in /home/USER/mail to /home/USER/Maildir/
have you an idea how old dovecot 0.9.x is? kiss them goodbye so they learn to take more care about data in the future
On Wed, Jan 9, 2013 at 5:29 PM, Reindl Harald h.reindl@thelounge.netwrote:
Am 09.01.2013 15:24, schrieb Odhiambo Washington:
On Wed, Jan 9, 2013 at 5:14 PM, Charles Marcus < CMarcus@media-brokers.com>wrote:
On 2013-01-09 9:02 AM, Odhiambo Washington odhiambo@gmail.com wrote:
[root@mail home]# dovecot --version 0.99.11
Ummm... seriously?
Your assignment, should you choose to accept it (or not), is to upgrade dovecot (and possibly if you have a similarly ancient/unsupported version of it too).
There is simply no, that is ZERO excuse for continuing to use this version of dovecot...
So true. However, I will let them run it unless they pay for upgrade.
At this moment in time, I only need to figure out how to migrate the mails which were in /home/USER/mail to /home/USER/Maildir/
have you an idea how old dovecot 0.9.x is? kiss them goodbye so they learn to take more care about data in the future
Hehee, I know. I started running Dovecot those those days!!!
Well, I am assisting a friend for now, so I cannot abandon him midway, especially after fixing the bits for him.
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
I can't hear you -- I'm using the scrambler.
Charles is right, There is little point in migrating mailboxes onto the server now, do the upgrade before! See if you can get a recent 1.2 version or if possible 2.1. More recent versions also have better features to help you with handling or converting a foreign mail store, but that is hardly even the central point here :-)
As for your old mail system, what software does it use? Do you have mailboxes with actual mail in them? Your ls output seems to show only indexes.
Gedalya
On 01/09/2013 09:02 AM, Odhiambo Washington wrote:
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@mail home]# dovecot --version 0.99.11
On Wed, Jan 9, 2013 at 5:20 PM, Gedalya gedalya@gedalya.net wrote:
Charles is right, There is little point in migrating mailboxes onto the server now, do the upgrade before! See if you can get a recent 1.2 version or if possible 2.1. More recent versions also have better features to help you with handling or converting a foreign mail store, but that is hardly even the central point here :-)
LOL
As for your old mail system, what software does it use?
Software in terms of front-end? I don't know if they use pop, but I understand they use squirrelmail as frontend.
Do you have mailboxes with actual mail in them?
Yes, a few - like the one I listed for johndoe.
Your ls output seems to show only indexes.
Hmmm.. maybe
See the output below
[root@mail home]# cd johndoe/ [root@mail johndoe]# du -h mail/ 32K mail/.imap/Sent 40K mail/.imap/Trash 32K mail/.imap/Drafts 176K mail/.imap/INBOX 284K mail/.imap 88M mail/
I wonder what is that 88MB? Just indexes??
-- Best regards, Odhiambo WASHINGTON, Nairobi,KE +254733744121/+254722743223
I can't hear you -- I'm using the scrambler.
On Qua, 09 Jan 2013, Odhiambo Washington wrote:
See the output below
[root@mail home]# cd johndoe/ [root@mail johndoe]# du -h mail/ 32K mail/.imap/Sent 40K mail/.imap/Trash 32K mail/.imap/Drafts 176K mail/.imap/INBOX 284K mail/.imap 88M mail/
Clearly most of the data (probably the emails) is not under the .imap
subdir, which is exactly what you didn't show us. It's probably mbox
files.
-- "Hello again, Peabody here..." -- Mister Peabody
Eduardo M KALINOWSKI eduardo@kalinowski.com.br
participants (5)
-
Charles Marcus
-
Eduardo M KALINOWSKI
-
Gedalya
-
Odhiambo Washington
-
Reindl Harald