Complete.Org: Mailing Lists: Archives: offlineimap: July 2002:
Re: OfflineImap 3.0
Home

Re: OfflineImap 3.0

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: dLux <dlux@xxxxxxx>
Cc: offlineimap@xxxxxxxxxxxx
Subject: Re: OfflineImap 3.0
From: John Goerzen <jgoerzen@xxxxxxxxxxxx>
Date: Mon, 15 Jul 2002 08:49:26 -0500

On Sun, Jul 14, 2002 at 07:46:26PM +0200, dLux wrote:


> This bug appears when you synchronize from imap to the Maildir, and
> delete the messages _in the synchronization state_. The following error
> message appears:

I think we can deal with this by trapping the unlink exception, trying to
re-cache the message list, and if the requested uid no longer occurs in it,
consider the message already deleted.

Martijn, mutt has two methods for deleting mail from Maildirs.  If
maildir_trash is true, it will simply set the flag T for deleted messages,
never actually unlinking the files.  Otherwise, the default behavior is to
unlink the files.

Other mail readers generally seem to choose one of those two strategies,
with some of them first marking messages T when a user selects the "delete"
option and then unlinking them when the user changes folders or picks
"expunge".  This behavior caused a similar error in earlier OfflineIMAP
versions because it would try to unlink a file that had been renamed to have
the T flag.

This problem is a symptom of a wider one, though -- and this is a general
flaw with Maildirs.  A message can be renamed underneath us at any time (it
gets marked answered, treashed, or whatnot).  We can try to reduce the
window for a race to occur but cannot ever completely eliminate it.  Though
to date I have made no effort to reduce the window -- we can probably make
it a lot friendlier for people.  I'll loko into that.

-- John

> 
> Thread 'Folder sync SPAM[.INBOX.SUXXMAIL]' terminated with exception:
> Traceback (most recent call last):
>   File "/usr/lib/python2.2/site-packages/offlineimap/threadutil.py", line 87, 
> in run
>     Thread.run(self)
>   File "/usr/lib/python2.2/threading.py", line 396, in run
>     apply(self.__target, self.__args, self.__kwargs)
>   File "/usr/bin/offlineimap", line 221, in syncfolder
>     localfolder.syncmessagesto(statusfolder)
>   File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 
> 263, in syncmessagesto
>     self.syncmessagesto_copy(dest, applyto)
>   File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 
> 209, in syncmessagesto_copy
>     self.copymessageto(uid, applyto)
>   File "/usr/lib/python2.2/site-packages/offlineimap/folder/Base.py", line 
> 175, in copymessageto
>     message = self.getmessage(uid)
>   File "/usr/lib/python2.2/site-packages/offlineimap/folder/Maildir.py", line 
> 126, in getmessage
>     file = open(filename, 'rt')
> IOError: [Errno 2] No such file or directory: 
> '/home/dlux/Maildir/.INBOX.SUXXMAIL/new/1026668164_0.10212.dl,U=256,FMD5=30399ee6e886557b26fff27f2d79f556:2,'
> 
> This is not a problem if your email reader is offline while you
> synchronize, but I don't want to quit from my mutt when I does
> synchronization... I am using this software over an 56k modem, so it
> takes 1-2 minutes to do synchronization. It is not good that I cannot
> touch the maildir which is in synchronization state.
> 
> Regards,
> 
> Szab?, Bal?zs (dLux)
> --
> Szabads?g, szerelem -- ext2 kell nekem
> 

-- 
John Goerzen <jgoerzen@xxxxxxxxxxxx>                       www.complete.org


[Prev in Thread] Current Thread [Next in Thread]