root / offlineimap / imapserver.py

imapserver.py

View | Annotate | Download (17.1 KB)

# Date Author Comment
10c2b6fb 09/16/2008 04:51 PM John Goerzen

Apply new darwin.patch from Vincent Beffara
fixes #20
patch dated 5/27/2008

2a852a8f 08/02/2008 05:04 PM John Goerzen

Rework keepalive to use time.sleep() instead of event.wait()

This should improve power-management abilities some more

The catch is that we can't wait any longer for the kathread to
terminate. We were waiting for this in some cases. This is probably
not a big deal.

fixes deb#434074
fixes #66

ca08c1e5 05/23/2008 02:58 PM Mark Hymers

Add support for ssl client certificates

This patch adds sslclientcert and sslclientkey configuration
options which are passed through to imaplib in order to allow
the use of client certificates for authentication.

Tue Nov 13 14:44:17 CST 2007 Mark Hymers <>

57492473 05/06/2008 08:11 AM John Goerzen

Revert "Apply darwin.patch from Vincent Beffara"

This reverts commit 9f5c8d708bfa9c16092255a59e13fe8171588c7a.

Several people were complaining about problems. See
http://bugs.debian.org/479677.

Closes: #479677.

refs #20.

9f5c8d70 05/01/2008 03:20 PM John Goerzen

Apply darwin.patch from Vincent Beffara

fixes #20

04/27/2008 09:34 AM - Vincent Beffara
  • File darwin.patch added

OK, I finally installed an IMAPS server on my iMac, so I could test a
little further. For some reason, fixing the read() method in
imaplibutil.py did not seem to work (it hung on connecting to the
server) - however, modifying the file imapserver.py similarly to the
non-SSL case fixed the crash.

I also reduced the chunk size to 100k instead of 1M, as 1M seemed to
still trigger the memory error in some cases. Ah, and I added a
platform test, so that the patch does essentially nothing on
non-Darwin machines ...

So, still no guarantee, but the attached patch works for me. Any
comments ?

(If noone here screams in horror at my code, I will include the patch
into the Fink package and see what happens there.)

f7b5aa4b 03/09/2008 12:46 AM Eric Dorland

Bug#359213: Kerberos

  • John Goerzen () wrote:
    > tages 359213 help
    > thanks
    >
    > Hi folks,
    >
    > Unfortunately, I lack both the expertise to add Kerberos
    > authentication and a way to test this. A patch would be very welcome
    > :-)

Well it was a bit unclear but there's a patch for offlineimap attached
to Guido's message:

http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=10;filename=support-GSSAPI-via-pykerberos.diff;att=1;bug=359213

I've tried it out and it works great! Except that if the Kerberos
layer throws an exception it wouldn't fail over to plain
authentication properly. Attached is a slightly reworked patch that I
tested it in the following situations:

1. python-kerberos uninstalled, with kerberos credentials.
Prompted for password authentication as expected.

2. python-kerberos installed, with kerberos credentials.
Keberos authentication was successful and my mail was fetched
without password prompting. Yeehaw!

3. python-kerberos installed, with no kerberos credentials.
Prompted for password authentication as expected.

I think those are all the interesting situations. So I think this is
ready to go in, with a Suggest on python-kerberos (>=
1.0+mk080218-1).

--
Eric Dorland <>
ICQ: #61138586, Jabber:

1ebc45d9 03/03/2008 08:22 AM John Goerzen

Fix performance for SSL

Added WrappedIMAP4_SSL class to help fix up performance of SSL

Standard imaplib.py is really bad with this, since it reads one
character at a time.

Reported by Aaron Kaplan at
offlineimap@complete.org/2008/01/msg00012.html.gz">http://lists.complete.org//2008/01/msg00012.html.gz

He wrote:

I just noticed that the version of offlineimap I've been using
(3.99.17) is well over four years old. How time flies. I haven't
had any problems with it, but out of curiosity I decided to pull in
5.99.2 from the fedora repository. It turns out to take
consistently over twice as long as the old version to sync the same
account. Is this expected?

He tracked it down at
offlineimap@complete.org/2008/02/msg00012.html.gz">http://lists.complete.org//2008/02/msg00012.html.gz

The following changeset is the one responsible for the difference in
speed I was noticing between the imaplib.py that was packaged with
older versions of offlineimap and the one that comes with python:
  • /offlineimap/head: changeset 169
    More optimizations -- this time fix readline() to not work
    character-by-character!
9bee28cb 07/05/2007 05:04 AM John Goerzen

Implement connect

4b10e30d 07/04/2007 07:34 PM John Goerzen

Added comment

4867d81c 07/04/2007 07:19 PM John Goerzen

Correct readonly handling

Upstream imaplib now issues EXAMINE when readonly != None
offlineimap/imaplib.py's version always used SELECT

691386b3 07/04/2007 07:17 PM John Goerzen

Compilation fixes

91392b75 07/04/2007 06:51 PM John Goerzen

Merging imaplibutil into code

71c8b2e7 12/11/2006 06:12 AM aaron

Configurable thread status character for ui.Curses.Blinkenlights

39a18fef 08/12/2006 05:15 AM John Goerzen

Update FSF address

d839be3c 04/16/2005 08:33 PM John Goerzen

Step 2 of SVN to arch tree conversion