[Dovecot] Convert MBOX

Erin D. Hughes erin-hughes at gmo.jp
Wed Jan 30 12:05:12 EET 2008


To all,

I am using dovecot --version 1.0.10 and trying to convert MBOXes to 
MailDir's with the end goal of creating one folder filled with users old 
MBOXes that when they log in for the first time will be converted to 
Mail Dir format.


I tried this and it did not work and gave me this output;
<snip>
 default_mail_env = maildir:%h/mail/
#convert_mail = mbox:%h/mail:INBOX=/usr/local/src/tmpmail/%u
 convert_mail = mbox:%h/mail/:INBOX=/usr/local/src/tmpmail/%u

 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] pop3-login: 
Login: user=<x4500>, method=PLAIN, rip=192.168.30.192, lip=172.20.12.8
 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Loading modules from directory: /usr/local/lib/dovecot/pop3
 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Module loaded:  /usr/local/lib/dovecot/pop3/lib20_convert_plugin.so
 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Effective uid=3000, gid=3000
 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: 
data=/export/x4500/mail/jp/n/e/jorgen/x4500/mail/:INBOX=/usr/local/src/tmpmail/x4500
 Jan 30 17:17:04 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: root=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
index=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
inbox=/usr/local/src/tmpmail/x4500
 Jan 30 17:17:06 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox:  
data=/export/x4500/mail/jp/n/e/jorgen/x4500/mail/:INBOX=/usr/local/src/tmpmail/x4500
 Jan 30 17:17:06 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: root=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
index=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
inbox=/usr/local/src/tmpmail/x4500
 Jan 30 17:17:06 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: data=/export/x4500/mail/jp/n/e/jorgen/x4500/mail/
 Jan 30 17:17:06 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: root=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
index=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, control=, inbox=
 Jan 30 17:17:07 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
Mailbox conversion: Couldn't copy mailbox dovecot.index.log: BUG: 
Unknown internal error
 Jan 30 17:17:07 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
Mailbox conversion: Couldn't copy mailbox dovecot.index: BUG: Unknown 
internal error
 Jan 30 17:17:08 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
Mailbox conversion: Couldn't copy mailbox dovecot.index.cache: BUG: 
Unknown internal error
 Jan 30 17:17:11 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: data=/export/x4500/mail/jp/n/e/jorgen/x4500/mail/
 Jan 30 17:17:11 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: root=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
index=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, control=, inbox=



</snip>
This actually created the x4500-convert directory but did not populate it

Then I tried this trying to get the mail dir created and populated.

<snip>
#convert_mail = mbox:%h/mail:INBOX=/usr/local/src/tmpmail/%u
convert_mail = mbox:/usr/local/src/tmpmail/%u:INBOX=/var/mail/%u

Jan 30 17:22:45 pop01.unix dovecot: [ID 673593 mail.info] Dovecot 
v1.0.10 starting up
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] pop3-login: 
Login: user=<x4500>, method=PLAIN, rip=192.168.30.192, lip=172.20.12.8
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Loading modules from directory: /usr/local/lib/dovecot/pop3
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Module loaded: /usr/local/lib/dovecot/pop3/lib20_convert_plugin.so
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
Effective uid=3000, gid=3000
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: data=/usr/local/src/tmpmail/x4500:INBOX=/var/mail/x4500
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: root=/usr/local/src/tmpmail/x4500, 
index=/usr/local/src/tmpmail/x4500, inbox=/var/mail/x4500
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: data=/usr/local/src/tmpmail/x4500:INBOX=/var/mail/x4500
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
mbox: root=/usr/local/src/tmpmail/x4500, 
index=/usr/local/src/tmpmail/x4500, inbox=/var/mail/x4500
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: data=/export/x4500/mail/jp/n/e/jorgen/x4500/mail/
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.info] POP3(x4500): 
maildir: root=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, 
index=/export/x4500/mail/jp/n/e/jorgen/x4500/mail, control=, inbox=
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
mkdir_parents(/usr/local/src/tmpmail/x4500/.imap/INBOX) failed: Not a 
directory
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
open() failed with subscription file 
/usr/local/src/tmpmail/x4500/.subscriptions: Not a directory
Jan 30 17:22:59 pop01.unix dovecot: [ID 107833 mail.error] POP3(x4500): 
Sending log messages too fast, throttling..
Jan 30 17:22:59 pop01.unix dovecot: [ID 961074 mail.error] child 23071 
(pop3) returned error 89
</snip>

I am a little confused because when I read the syntax 
http://wiki.dovecot.org/Plugins/Convert?highlight=%28convert%29

It looks like it should say

"convert_mail= mbox:/users/home/dir/mail/:INBOX=/location/of/old/MBOX/file"

I have tried a number of different combinations but am still failing to 
get the mail/{cur,new,tmp} created in the correct user directory with 
actual mail in them.

Can some one please help w/this?

Additionally is there a way to run mail_convert on the command line to 
try to sort out the arguments? I noticed the converts are .so and .a in  
/usr/local/lib/dovecot/ so I doubt it but it can not hurt to ask.
 



More information about the dovecot mailing list