[Dovecot] migration and conversion from courier

Giuliano Gavazzi dev+lists at humph.com
Fri May 15 11:55:56 EEST 2009


Dear all,

back in January I posted about migration from courier and in  
particular on the script courier-dovecot-migrate.pl.
That script had a bug on BSD (or should I say not-Linux?) type  
systems*. On FreeBSD (6.1) and MacOSX (10.5) it appended a lot of  
binary garbage at the end of dovecot-keywords files.
On a couple of systems I had not actually run the script with the -- 
convert option, as I had misunderstood the procedure, so those  
systems, ironically, are the ones that I migrated better...

Now to the issue. My final question at the time was
(http://dovecot.org/pipermail/dovecot/2009-January/036292.html):

can one delete the dovecot-keywords and rerun the script (leaving  
alone the dovecot-uidlist)?

There is a problem if this cannot be done, as those files have the  
following structure:

0 flag0
1 flag1
...
m binary garbage
[optionally followed by more lines like the last]

and if a new keyword is added, the file ends up like (this is copy and  
paste example):

0 JunkRecorded
1 $NotJunk
2 $Junk
3 Redirected
4 ^A<F0>#
5 <B0><96>#
6 $Forwarded

It does not look like a nice thing to me.
I doubt though that the script will cope with flags correctly, as in  
principle will get the flags from an out of date courierimapkeywords,  
thus missing any new ones.
Perhaps the only solution is to have a new script that deletes the  
garbage lines and renumbers the following ones, so that the above  
example would become:

0 JunkRecorded
1 $NotJunk
2 $Junk
3 Redirected
4 $Forwarded

and then renames all *g files to *e.

Thoughts?

Giuliano

* This bug was fixed back then by Timo who replaced the script on the  
site http://www.dovecot.org/tools/courier-dovecot-migrate.pl. But  
there's no note of the change on the site nor was an announcement made  
to the list, AFAIK.


More information about the dovecot mailing list