INFINITE FOLDER CREATION DETECTED!

Giuseppe Attardi attardi at di.unipi.it
Wed Apr 17 13:39:49 BST 2013


On 4/17/2013 10:34, Tomasz ┼╗ok wrote:
> Dear Giuseppe,
>
> On 04/17/13 at 03:39am, Giuseppe Attardi wrote:
>> nametrans = lambda x: 'Archivio.' + x.replace('.', 'dot')
>>
>> (...)
>>
>> I do not understand why it complains.
> Your configuration will first create an archive of every IMAP folder and in the
> next sync, it will try to create an archive of every archive, ad infinitum.
>
>
> For what you would like to achieve I can propose imapfilter project:
>      https://github.com/lefcha/imapfilter
>
> When you set imapfilter as a presync hook in OfflineIMAP it will run before the
> messages are downloaded. And in the imapfilter itself, you can program the
> archivisation of your IMAP folders.
>
> So the scheme would look like this:
> -   OfflineIMAP begins to sync, BUT FIRST it launches imapfilter
> -   Imapfilter will create archives as you wish on the IMAP server side
> -   When imapfilter finishes, OfflineIMAP will now really sync and will notice
>      the archived copies to be downloaded
>
>
> Probably what you want to achieve can be done purely in OfflineIMAP, without
> external tools, but IMHO the proposed solution above is clearer and easier to
> maintain. Of course this is open to discussion for other members of OfflineIMAP
> mailing list.
>
>
> Note that I am not anyhow related to imapfilter project and in fact I used it
> some time ago only.
>
> Best regards,
> Tomasz
>
Thanks for the hint.
However the explanation does not convince me.
The first run of offlineimap does both things correctly: it creates the 
folders and syncs them.
It recreates the folder hieararchi from the remote Exchange repository 
into the local Archivio rspository.

I do not understand why, repeating the process and using the same 
configuration (i.e. same source and same target) it should create 
folders within the Archive folder that it created in the first run.
The operation should be idempotent.
It should always start from the remote repository and create the folders 
in the same place as before, not within the new folders it created in 
the first run.

What it seems from the error message it is trying to copy a folder that 
does not exist in Exchange, since Archivio is only present in Ateneo:

'Archivio/networks/CAF' (repository 'Exchange'). The latter becomes
'Archivio.Archivio.networks.CAF'

How can this be explained?

-- Attardi






More information about the OfflineIMAP-project mailing list