It looks like I accidentally recorded the wrong version of Curses.py --
originally this code was there, but I moved it over to UIBase so it would
cover the TTY UI also.
From Ben Kibbey
hello,
Attached is a patch to enable evaluation of account credentials with the
remotehosteval, remoteusereval and remotepasseval configuration options.
I needed this because rather than change all my other programs
configuration settings when I change, say a password, I store them in a
file. So I call a function in pythonfile which parses the credential
file and returns the wanted info. Not really very well tested, but not
complex either. Offlineimap is great, thanks.
From: Ben Kibbey
Subject: Re: Removed restoratime from OfflineIMAP
On Wed, May 03, 2006 at 10:08:35PM -0500, John Goerzen wrote:
> Hi Ben,
>
> Thanks for your restoreatime patch.
>
> However, I have received this bug report:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=365933
>
> After looking at the problem, here's what's going on.
>
> The person is using IMAP as the local repository as well.
>
> You really need to move the atime save and restore code from accounts.py
> into the repository/Maildir.py. Then, for any new call you add to the
> Maildir repository (that will be called from outside Maildir.py), you
> need to add a corresponding default function to repository/Base.py, and
> also make sure that on folders (such as IMAP) where atime restoration
> makes no sense, no error is generated.
>
> Let me know if that doesn't make sense to you. If you get it fixed, I'd
> be happy to re-apply it to a future version of OfflineIMAP.
>
> -- John Goerzen
>
Attached is a new diff that should work though not really tested
(v4.0.14). In repository/Base.py restore_atime() will call
self.restore_folder_atimes() only if the folder type is Maildir. Let me
know if it has any more problems.
The attached patch adds syncing the INTERNALDATE of IMAP folders with
the mtime of messages in maildir folders.
I want this to happen, because I'm running a dovecot over the maildirs
synced by offlineimap, and that uses the mtime as the INTERNALDATE.
When using mutt to view messages I generally sort based on the received
date, which for IMAP folders is the INTERNALDATE.
Since this is the first real coding I've done in Python the patch may
need to be cleaned up some, but it's working pretty well for me. I've
added new messages to each side, and the received date has been
preserved going both ways.
From: Ben Kibbey <bjk@luxsci.net>
Attached is a patch to restore the atime of Maildir folders after
syncing. It can be enabled via the 'restoreatime' boolean in the
configuration file. I needed this because offlineimap is run after a
fetchmail and my mail checker breaks.
Patch from Nikita V. Youshchenko
From: "Nikita V. Youshchenko"
To: Debian Bug Tracking System
Subject: offlineimap: exception on mail with broken headers (+fix)
Date: Wed, 24 Aug 2005 13:41:08 +0400
Package: offlineimap
Version: 4.0.10
Severity: normal
Tags: patch
Recently I've got an exception (see below) while using offlineimap.
Exception was probably caused by invalid Date header of (likely spam)
message:
Date: Sat, 20 Aug 2005 4294967295:43:18 -0700
From: "Nikita V. Youshchenko"
I trued to use offlineimap and found that while being quite fast on
small folders, it takes up to several minutes (of 100% busy CPU and
almost no network traffic) to sync a folder with 2000+ messages.
While looking into the code, I found why this happens.
In folder/Base.py, in method BaseFolder.syncmessagesto_copy(),
dest.getmessagelist() is called inside a loop, while being a loop
invariant. Similar thing happens in BaseFolder.syncmessagesto_delete()
for self.getmessagelist().
This causes quadratic complexity over folder size.
Moving these calls out of loops make large folder sync fast (several
seconds instead of several minutes for folder with 2000 messages on
700MHz P3).
Applied patch from Joerg Wendland <joergland@debian.org> to use
APPENDUID result from mail servers that provide it. Closes: #198772.
Resolves: [debian.org #198772]
Added a "force" option to imapserver/select to force a reloading of a
folder. Per [complete.org #67], when cachemessagelist() was called on
an object that was cached from a previous run, it would not re-issue
the select(). Closes: [complete.org #67]
Added -l option. Updated documentation for it. Changed _msg to
_display override in UI modules. Renamed "doc" to "docs" target in
Makefile to avoid conflicting with a subdir.
- offlineimap (3.99.17) unstable; urgency=low
- Fixed two potential obscure race conditions in folder/Maildir.py. +
Condition 1 involved the gettimeseq() function. This function
accesses per-module variables but does not have a lock. It may have
been possible for this to have been called in such a way that
timeseq was not properly updated. + Condition 2 involved the call to
gettimeseq(). Since the timeseq is based on the system clock, we now
use the time as reported inside timeseq() rather than outside. This
way, we can be assured that the same value is in use both places.
- Added debug code to savemessage in folder/Maildir.py to try to track
down a mysterious 0-length file bug. -- John Goerzen
<jgoerzen@complete.org> Tue, 6 May 2003 09:21:38 -0500
- Added some significant debug code to folder/IMAP.py when saving a
new message with APPEND. This should make it easier to track down
bugs both in OfflineIMAP and in mail servers that implement this
poorly.
- Fixed adding of X-OfflineIMAP header when the message starts out
with no headers. (This should not generally occur.) This should help
with some "invalid literal for long()" problems.
When sep was /, the new Maildir support code would recursively try to
scan ., resulting in huge paths and an eventual crash. Fixed with a
one-line patch to Maildir.py. Closes: [complete.org #60] Sergei, The
below diff is going into 3.99.16. You can apply it to 3.99.15 and it
should work for you now. Please let me know. (Ignore any patch errors
for debian/changelog). Thanks for the report.
Raise an exception when the status area is locked. This will cause UIs
to go through their normal exception handling code. In particular, for
the Curses.Blinkenlights interface, the Curses module will be stopped
and the error message will be printed on the console. Previously, this
error message would not have been visible. Closes: #185709.
- Slight renaming in offlineimap.conf.minimal to clarify things.
- Documentation updated with information about new features. Closes:
#189771. + Described IMAP-IMAP syncing + Updated minimal example
with new offlineimap.conf.minimal + Updated UID information. Added
link to recent mailing list discussion. + Described KMail syncing,
which now works. + Added link to mailing list archives.
- Now checks that SELECT succeeded when entering a folder.
- Verifies that folders listed on folderincludes actually exist by
trying to enter them. Thus, if they do not exist, they can be
created on the first run.
Fixed line-ending code to deal with files with mixed \n and \r\n
codes. This is a rare case, but now is more onerous because we now
have to find headers.
Due to possibly having one account sleep while another is reading a
password, and other tricky situations, support for nice updating and
cancelling of a sleep in TTY.TTYUI has been removed. However, this is
not going to be a huge problem because the new Curses Blinkenlights
interface has this support, and does it a lot better than TTY.TTYUI
ever could have.