problem upgrading from offlineimap 6.3.4 to 6.6.1

francois at avalenn.eu francois at avalenn.eu
Wed Jan 20 12:56:24 GMT 2016


Package: offlineimap
Version: 6.6.1+dfsg1-1
Severity: normal

Hello,

As Marcelo Laia pointed out last week on offlineimap-project list
Debian has uploaded 6.6.1 on their repositories.

While upgrading from jessie to stretch for unrelated reasons
offlineimap was upgraded from 6.3.4 to 6.6.1 and it had a unexpected
effect in my case.

Indeed the nametrans change seems to imply a complete reupload of my
local mail on remote server which can be very long and painful even if
it doesn't lead to loss of data.

I think that the problem comes from the use of nametrans in
visiblename for Maildir folder (commit
6b2ec956cfe8e356d3ffd54eee34773deb73279f) because it lead to change
the FMD5 part of the filename.

A workaround which seems to work is to rename all filenames in
concerned Maildirs with the new calculated md5sum.

With my setup I use this dirty hack in shell :

    MYPREFIX=localprefix
    for box in $HOME/Maildir/${MYPREFIX}.* ; do
        cd $box
        oldmd5=$(pwd | sed 's!.*/!!' | tr -d '\n' | md5sum | sed 's/ *-$//')
        newmd5=$(pwd | sed "s!.*/!!;s!^${MYPREFIX}\.!!" | tr -d '\n' | md5sum | sed 's/ *-$//')
        for dir in cur new ; do
            rename -v "s/FMD5=${oldmd5}/FMD5=${newmd5}/" ${dir}/* ;
        done
    done


Note that this only works if done after the last use of offlineimap
6.3.4 and before the first use of offlineimap 6.6.1. If done at other
moments I think we risk loss of mails and duplicates of mails.

I would like a way for offlineimap to either upgrade concerned
Maildirs on the fly or to have a way to ensure that proper manual
actions are done before using it. As offlineimap is often used in
crontabs this must be done during upgrade of package.

François




More information about the OfflineIMAP-project mailing list