Revision:

Revisions

# Date Author Comment
61567d0d 12/01/2008 04:15 PM John Goerzen

made note in changelog

e1fb9492 12/01/2008 04:13 PM John Goerzen

Patch for signal handling to start a sync by Jim Pryor
Here's the way I'd like to use offlineimap on my laptop:
1. Have a regular cron job running infrequently. The cron job
checks to see
if I'm online, plugged in, and that no other copy of offlineimap is
running. If
all of these conditions are satisfied, it runs offlineimap just once:
"offlineimap -o -u Noninteractive.Quiet" until cron-started copies of offlineimap have finished, then starts
offlineimap
on its regular, stay-alive and keep checking schedule. When I quit
mutt, the
wrapper script tells offlineimap to stop.

2. When I start up mutt, I do it by calling a wrapper script that
delays

This way I get frequent regular checks while I have mutt running, but
I don't
waste my battery/cpu checking frequently for mail when I'm not
interested in
it.

To make this work, though, it'd be nicer if it were easier to tell
offlineimap,
from the outside, things like "terminate cleanly now" and "when you've
finished
synching, then terminate instead of sleeping and synching again."

OK, to put my money where my mouth is, I attach two patches against
offlineimap
6.0.3.

The first, "cleanup.patch", cleans up a few spots that tend to throw
exceptions
for me as offlineimap is exiting from a KeyboardInterrupt.

The second adds signaling capabilities to offlineimap.

  • sending a SIGTERM tells offlineimap to terminate immediately but
    cleanly,
    just as if "q" had been pressed in the GUI interface
  • sending a SIGUSR1 tells every account to do a full sync asap: if
    it's
    sleeping, then wake up and do the sync now. If it's mid-sync, then
    re-synch
    any folders whose syncing has already been started or completed, and
    continue
    to synch the other, queued but not-yet-synched folders.
  • sending a SIGHUP tells every account to die as soon as it can (but
    not
    immediately: only after finishing any synch it's now engaged in)
  • sending a SIGUSR2 tells every account to do a full sync asap (as
    with
    SIGUSR1), then die

It's tricky to mix signals with threads, but I think I've done this
correctly.
I've been using it now for a few weeks without any obvious
problems. But I'm passing it
on so that others can review the code and test it out on their
systems. I developed the
patch when I was running Python 2.5.2, but to my knowledge I don't use
any Python 2.5-specific
code. Now I'm using the patch with Python 2.6.

Although I said "without any obvious problems," let me confess that
I'm
seeing offlineimap regularly choke when I do things like this: start
up
my offlineimap-wrapped copy of mutt, wait a while, put the machine to
sleep (not sure if offlineimap is active in the background or idling),
move to a different spot, wake the machine up again and it acquires a
new network, sometimes a wired network instead of wifi. Offlineimap
doesn't like that so much. I don't yet have any reason to think the
problems here come from my patches. But I'm just acknowledging them,
so
that if others are able to use offlineimap without any difficulty in
situations like I described, then maybe the fault is with my patches.

5db24303 12/01/2008 04:10 PM John Goerzen

Patch to make exit on Ctrl-C cleaner
From Jim Pryor

The first, "cleanup.patch", cleans up a few spots that tend to throw
exceptions for me as offlineimap is exiting from a KeyboardInterrupt.

d6917609 10/01/2008 12:33 AM John Goerzen

New option to only work with subscribed folders

Patch from Sean Finney, slightly modified by John Goerzen to change
name of config file option

fixes deb#499588

936fe1f4 10/01/2008 12:04 AM John Goerzen

Added docs for hooks

Patch from Sias Mey

fixes #71

ab43d745 10/01/2008 12:03 AM John Goerzen

Applied pre/post sync hooks

Patch from Sylvain FORET in refs #71

c886987a 09/29/2008 06:04 PM John Goerzen

Merge branch 'master' of ssh:///~jpgarch/git/offlineimap

5fe379f6 09/26/2008 10:43 AM Michael Witten

imaplibutil: Remove flagrantly bad use of private attribute

Frankly, the original code doesn't even make much sense, and
moreover it's not forward compatible with python 2.6, and
furthermore:

DeprecationWarning: socket.ssl() is deprecated.

So, this commit is just a temporary fix.

Signed-off-by: Michael Witten <>

10c2b6fb 09/16/2008 04:51 PM John Goerzen

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

140be81e 08/13/2008 01:19 AM Henning Glawe

make the trash and spam folder names in Gmail accounts configurable

d097da00 08/13/2008 12:05 AM John Goerzen

Prepping 6.0.3

9551e9d3 08/11/2008 08:38 PM John Goerzen

task_done wasn't in Python before 2.5

1d91fb7a 08/08/2008 01:08 PM John Goerzen

Merge branch 'master' of ssh:///~jpgarch/git/offlineimap

04a62700 08/07/2008 09:16 PM Ben Willard

Fix a bug preventing the pid file from being empty.

Convert os.getpid() to a string before writing it to the pid file in
order to avoid generating an empty pid file.

54a6ce8c 08/07/2008 03:51 AM John Goerzen

Clarified and highlighted the need to set maxsyncaccounts to sync more
than 1 account

1b9f04a5 08/05/2008 12:07 AM John Goerzen

Removed debug statements

fe573424 08/05/2008 12:05 AM John Goerzen

Yet another Python threading workaround.

module threading should be taken out back and shot.

Condition.wait() is a busywait loop that has negative implications for
battery consumption on laptops.

Queue.get() in blocking mode blocks SIGINT from being delivered.

Argh, argh, argh.

Closes: #493801.

b267fd25 08/02/2008 05:44 PM John Goerzen

Update changelog

0a801457 08/02/2008 05:44 PM John Goerzen

Bump version to 6.0.2

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

b9f73621 08/02/2008 03:39 PM John Goerzen

Update changelog

0da6beda 08/02/2008 03:31 PM John Goerzen

Eliminate one more fsync

fb71fa96 08/02/2008 03:18 PM John Goerzen

Update for 6.0.1

a5dc9a33 08/02/2008 03:13 PM John Goerzen

Bump version to 6.0.1

fbcb157c 08/02/2008 03:11 PM John Goerzen

Fix syntax error in nofsync support

1 2 3 ... 29 Next » (1-25/705) | Per page: 25, 50, 100