[Dovecot] problem migrating from maildir to dbox

Захаров Роман zaharovr at inbox.ru
Fri Sep 9 16:26:59 EEST 2011


09.09.2011 16:19, Ramón Frontera пишет:
> Hello,
> we want to migrate Mail folders from Maildir to dbox without downtime.
> We change the mail_location to dbox in 10-mail.conf and restart dovecot.
> After that we use dsync -u user mirror maildir:~/Maildir.
> The problem is that if INBOX exists the dsync create a new folder with name like b5893c0a93ff694e551200002dfa3112
> Can I migrate to the existing INBOX? or How can I merge the 2 INBOX folders?
> Thanks for your help!
> Regards,
>
> --
> Ramon
>
>
>
My transition from maildir to mdbox occurred so:
/Maildir - an old place of mail
/Mailbox - new

mail_location=%h # set home for all users maildir:/Maildir/user_name

script:
for i in `echo "select name from user|$sql`
do
        res=$(dsync -u $i backup mdbox:/Mailbox/$i)
        if [ $res -eq 0 ];then
               echo "update user set home=\"mdbox:/Mailbox/$i\" where 
name=$i"|$sql
               echo "$i migrated" >> $log
        fi
done



More information about the dovecot mailing list