Commit Graph

761 Commits

Author SHA1 Message Date
John Goerzen
2378f6b68e Merge branch '620nmu'
Conflicts:
	debian/changelog
2010-06-29 16:50:33 -05:00
John Goerzen
7516154686 Imported Debian version 6.2.0+nmu2 2010-06-29 16:49:52 -05:00
John Goerzen
51dacd0855 Orphaning this Debian package 2010-06-08 10:22:59 -05:00
John Goerzen
3c4dee17a4 Put subscribedonly in correct place in example config file
fixes #137
2010-04-21 00:09:37 -05:00
John Goerzen
d72ed698da Noted new -k feature in doc. 2010-04-21 00:01:04 -05:00
John Goerzen
9c6581eb39 Now support multiple -k options on the command line.
Patch by Vladimir Marek

fixes #113
2010-04-21 09:17:08 -05:00
John Goerzen
6fbb23a8c5 Ignore build directory 2010-04-07 14:36:10 -05:00
Michal Schmidt
caa7d8a128 much faster deleting of messages from LocalStatus
After tens of thousands of messages on the IMAP server were deleted it
takes offlineimap extremely long time (several hours of high CPU usage)
to delete them locally. It spends almost all the time modifying
LocalStatus. It processes the messages one by one, rewriting the
folder's status file in LocalStatus after each message.

It is much more efficient to save the status file only once, after
removing all the messages from the messagelist.

Deleting lots of messages now takes seconds instead of hours.

This should solve Debian bug #518093:
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=518093

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
2010-03-31 21:32:51 -05:00
Mike Dawson
30344587d9 Patch for error handling / separation of accounts etc.
Dear All,
I have made the attached patch to try and make offlineimap a bit more
stable in challenging situations.  It's extremely useful in slow
connection environments - but sometimes if one account had the wrong
password or the connection went down then unfortunately the whole
program would crash.

I have tested this on our connection and tried throwing at it just about
every situation - connection, up down, up, down again, change password,
error whilst copying one message, etc.  I have been running this patch
for the last 5 days or so syncing 6 accounts at the moment...  It seems
to work and stay alive nicely (even if your connection does not)...

Hope that this can go in for the next release... Please let me know if
anyone notices any problems with this...

Regards,

-Mike

-- Attached file included as plaintext by Ecartis --
-- File: submit

From 1d6777cab23637eb830031c7cab0ae9b8589afd6 Mon Sep 17 00:00:00 2001
From: mike <mike@mikelaptop.(none)>
Date: Mon, 24 Aug 2009 19:37:59 +0430
Subject: [PATCH] This patch attempts to introduce a little more error handling - e.g.
 if one account has an error because of a changed password or something
 that should not affect the other accounts.

Specifically:
If one sync run has an issue this is in a try-except clause - if it
has an auto refresh period the thread will sleep and try again - this
could be quite useful in the event of the connection going down for a
little while, changed password etc.

If one folder cannot be created an error message will be displayed through
the UI and the program will continue (e.g. permission denied to create a folder)

If one message does not want to copy for whatever resaon an error message
will be displayed through the UI and at least the other messages will
be copied

If one folder run has an exception then the others will still run
2009-08-28 00:01:10 -05:00
John Goerzen
43ead072a1 Merge branch 'master' of ssh://jpgarch@complete.org/~jpgarch/git/offlineimap 2009-08-24 00:02:13 -05:00
Toke Høiland-Jørgensen
a781016633 Fix ssl socket wrap deprecation warning. 2009-08-24 00:01:54 -05:00
John Goerzen
1148df7685 Merge branch 'maxage'
Conflicts:
	offlineimap/folder/IMAP.py
2009-08-16 09:29:00 -05:00
Mike Dawson
cde94e5047 Patch for maxage and maxsize options
Dear All,
Attached is the patch that I have developed to provide maxage and
maxsize options.  You can thus sync only the last x days of messages and
exclude large messages.  All details in the attached git file.

Regards,

-Mike

-- Attached file included as plaintext by Ecartis --
-- File: submit

From 04fead2b46a79675a5b29de6f2b4088b9c9448e5 Mon Sep 17 00:00:00 2001
From: mike <mike@mikelaptop.(none)>
Date: Sun, 16 Aug 2009 17:00:49 +0430
Subject: [PATCH] Patch to provide maxage and maxsize account options to exclude old/large messages

This is designed to make offlineimap even better for low bandwidth connections.

maxage allows you to specify a number of days and only messages within
that range will be considered by offlineimap for the sync.  This can be
useful if you would like to start using offlineimap with a large
existing account and do not want to import large archives of mail.

maxsize allows you to specify the maximum size of a message to consider so
that you can exclude messages with large attachments etc.

In both cases the cachemessagelist function of the folder was modified to ignore
messages that do not meet the criteria.  If the criteria are not specified
then the existing code will be executed the same as before.  If a message
does not meet the criteria it will be as though this message does not exist
- offlineimap will completely ignore it.  It will not have flags updated,
it will not be deleted, it will not be considered at all.

When operating against an IMAP repository a server side search function
is used.  This of course requires support for server side search.

I have tested this with either option, no options etc. against IMAP, Maildir
and Gmail.  I have run variations of this patch here for the last 3 weeks or
so syncing about 4 accounts normally.
2009-08-16 09:27:49 -05:00
John Goerzen
5d4fe0ceae Noted Debian bugs closed 2009-08-12 00:54:23 -05:00
John Goerzen
be086d428c update version for 6.2.0 2009-08-12 00:53:04 -05:00
John Goerzen
2433dc9f06 Merge branches 'master' and 'master' of ssh://jpgarch@complete.org/~jpgarch/git/offlineimap 2009-08-12 15:25:26 -05:00
John Goerzen
ea42dab86a Update copyright 2009-08-12 00:41:42 -05:00
John Goerzen
9e6427a443 update version info 2009-08-12 00:41:19 -05:00
John Goerzen
762b589842 Merge branch 'rmimaplib2', removing imaplib2.py and IDLE support
The IDLE support appears to be fine, but it required imaplib2.py,
which was a significant source of stability issues for users.  Some
were highlighted at:

http://lists.complete.org/offlineimap@complete.org/2009/08/msg00008.html.gz

Fixes #177, #176, #174
Closes: #536156, #536329.
2009-08-12 00:30:03 -05:00
John Goerzen
1f8024a70e [imaplib2 removal] Revert "Implementation of IMAP IDLE"
This reverts commit 3847d0ba9d.
2009-08-12 14:49:58 -05:00
John Goerzen
36e0971adb [imaplib2 removal] Revert "use latest version of imaplib2"
This reverts commit fadbd38ef9.
2009-08-12 14:49:50 -05:00
John Goerzen
3869af9e0b [imaplib2 removal] Revert "Allow keepalive to be overridden by user if imapfolders is set"
This reverts commit 8cd2bdf7f5.
2009-08-12 14:49:12 -05:00
John Goerzen
8e1fc71879 [imaplib2 removal] Revert "Added check for IDLE in capabilities"
This reverts commit 17ec4df02a.
2009-08-12 14:48:38 -05:00
John Goerzen
a3a0a68163 Revert "Quick synchronizations (for 'quick' > 0) are now performed between full synchronizations (as specified in the documentation)."
This reverts commit 220db8a77d.

From: Daniel Jacobowitz
Date: July 17, 2009

The documentation may have been unclear, but quick never worked the
way this patch changes it.  My installed offlineimap does one sync
every $autorefresh minutes, and the $quick'th one is a full sync.  All
the others are quick.  Now it's going to do a full sync every
$autorefresh minutes and a ludicrous number of $quick syncs.

-- Daniel Jacobowitz CodeSourcery
2009-07-17 00:03:29 -05:00
John Goerzen
e66fd5f51a Don't request INTERNALDATE when we don't need it. Patch from Marc MERLIN. 2009-07-16 20:57:07 -05:00
John Goerzen
312b91a1a5 Fix 6.1.2 changelog 2009-07-16 00:05:34 -05:00
John Goerzen
b053923d41 Prepping 6.1.2 2009-07-16 00:03:23 -05:00
Michal Vitecek
220db8a77d Quick synchronizations (for 'quick' > 0) are now performed between full synchronizations (as specified in the documentation).
Hello John,

 The attached patch makes quick synchronization work again (according to
 the documentation), so there are <quick> quick synchronizations
 performed between full synchronizations.

 Thanks,
        Michal
2009-07-12 08:54:18 -05:00
John Goerzen
dd351a2465 Merge branch 'master' of ssh://jpgarch@complete.org/~jpgarch/git/offlineimap 2009-07-12 08:53:18 -05:00
Christoph Höger
fadbd38ef9 use latest version of imaplib2
* fixes rh bz #510036
Signed-off-by: Christoph Höger <choeger@cs.tu-berlin.de>

[ per jgoerzen: rh bz #510036 is Kerberos issue.  also Closes: #535794 in Debian ]
2009-07-12 08:52:29 -05:00
John Goerzen
141a23849b Reduce memory usage when scanning Maildirs
Patch from Michal Vitecek
2009-07-07 00:52:00 -05:00
John Goerzen
7bdd4a69fa Fix the order of folders during sync
was broken by e1fb9492f8
      (Patch for signal handling to start a sync by Jim Prior)

This patch from Nicolas Dandrimont.  Closes: #535540.
2009-07-07 00:04:52 -05:00
John Goerzen
5c11de5285 Merge branch 'master' of ssh://jpgarch@complete.org/~jpgarch/git/offlineimap 2009-07-06 10:11:20 -05:00
John Goerzen
2683980733 Fixing Python issue to minimum 2.5 2009-07-02 00:04:20 -05:00
John Goerzen
15370c9f0c Fix minimum Python version. Closes: #535481. 2009-07-02 00:03:05 -05:00
John Goerzen
c06ce3ddb7 Removed old reference to README 2009-07-01 21:01:20 -05:00
John Goerzen
8b625fa98e Bump version number 2009-07-01 21:00:30 -05:00
John Goerzen
a969c376de Updated changelog 2009-07-01 20:59:45 -05:00
John Goerzen
e5f6e392a8 Added patch for Python 2.6 ssl 2009-07-01 20:49:20 -05:00
Peter Colberg
3299b2240c Applied patch from Peter Colberg to remove usage of hard linking
Closes: #535160

Bug#535160: offlineimap fails on encfs (FUSE) due to hard linking

Package: offlineimap
Version: 6.0.3
Severity: normal
Tags: patch

Hi,

if the localrepository is stored on an encfs, offlineimap fails as follows:

    OfflineIMAP 6.0.3
    Copyright (C) 2002 - 2008 John Goerzen <jgoerzen@complete.org>
    This software comes with ABSOLUTELY NO WARRANTY; see the file
    COPYING for details.  This is free software, and you are welcome
    to distribute it under the conditions laid out in COPYING.
    ***** Processing account pleione
    Copying folder structure from IMAP to Maildir
    Establishing connection to tunnel:eval `keychain --quiet --eval` && ssh -q mymailhost /usr/sbin/dovecot --exec-mail imap.
    Syncing Drafts: IMAP -> Maildir
    Syncing INBOX: IMAP -> Maildir
    ----------8<----------
    Syncing net: IMAP -> Maildir
    Copy message 360 IMAP[net] -> Maildir[net], LocalStatus[net]
    Syncing personal: IMAP -> Maildir
    Thread 'Copy message 360 from net' terminated with exception:
    Traceback (most recent call last):
      File "/var/lib/python-support/python2.4/offlineimap/threadutil.py", line 149, in run
	Thread.run(self)
      File "threading.py", line 422, in run
	self.__target(*self.__args, **self.__kwargs)
      File "/var/lib/python-support/python2.4/offlineimap/folder/Base.py", line 282, in copymessageto
	newuid = object.savemessage(uid, message, flags, rtime)
      File "/var/lib/python-support/python2.4/offlineimap/folder/Maildir.py", line 198, in savemessage
	os.path.join(tmpdir, messagename))
    OSError: [Errno 1] Operation not permitted

    Last 4 debug messages logged for Copy message 360 from net prior to exception:
    ----------8<----------

As encfs does not support hard linking, the rename of the temporary
message file fails.

This is the only occurrence of hard linking in offlineimap and can be
fixed by using an atomic `os.rename` instead of `os.link`+`os.unlink`.
I have been using the attached patch for more than 1.5 years and have
never again had any problems with offlineimap on encfs.

Regards,
Peter
2009-06-30 00:03:37 -05:00
Christoph Höger
0a221dc9c5 set gssapi to false on kerberos error
* this fixes a crash when the n-th connection returns an error
	by falling back to plainauth
Signed-off-by: Christoph Höger <choeger@cs.tu-berlin.de>
2009-06-29 00:05:00 -05:00
John Goerzen
d1f5a28277 Update changelog 2009-05-05 15:17:59 -05:00
Jonny Lamb
2e22b41231 Bug#502779: Sync accounts in order of general.accounts option
On Tue, Apr 21, 11:19:00 -0500, John Goerzen wrote:
> I think the one loss of functionality we have here is that it doesn't
> check if a given account has already been listed before adding to the
> list.  Should be a simple tweak.  If you could tweak that and test, I'd
> apply a new patch.

Good catch. I attach an updated patch which I've tested and it appears
to work fine, including not syncing two accounts twice.

Thanks,

--
Jonny Lamb, UK
jonny@debian.org

From 7f348ee116bba64f7330e28d4e7b2c015910a890 Mon Sep 17 00:00:00 2001
From: Jonny Lamb <jonny@debian.org>
Date: Tue, 05 May 2009 20:45:17 +0100
Subject: [PATCH] Respect order of general.accounts config setting.

This makes the order of account synchronisation the same as the order of
the general.accounts setting by using a list instead of a dict, which
was actually pointless as the value of each dict item was never even
looked at.

Signed-off-by: Jonny Lamb <jonny@debian.org>
2009-05-05 15:16:25 -05:00
John Goerzen
817c09a460 Apply patch to fix autorefresh with Kerberos
Patch from Eric Dorland

Closes: #470875

From: Wouter Verhelst
Subject: kerberos authentication works only the first time
Date: Fri, 14 Mar 2008 09:28:37 +0100

Package: offlineimap
Version: 5.99.8
Severity: normal

Hi,

I have the "autorefresh" configuration option specified in my
.offlineimaprc, and am now using the kerberos authentication.

However, this kerberos authentication seems to work only the first
time
offlineimap tries to fetch mails. The next time, it fails with this
output:

Thread 'Account sync Test' terminated with exception:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.4/offlineimap/threadutil.py",
  line 153, in run
    Thread.run(self)
  File "/usr/lib/python2.4/threading.py", line 422, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/var/lib/python-support/python2.4/offlineimap/accounts.py",
  line 119, in syncrunner
    self.sync()
  File "/var/lib/python-support/python2.4/offlineimap/accounts.py",
  line 148, in sync
    remoterepos.syncfoldersto(localrepos, [statusrepos])
  File
  "/var/lib/python-support/python2.4/offlineimap/repository/Base.py",
  line 135, in syncfoldersto
    srcfolders = src.getfolders()
  File
  "/var/lib/python-support/python2.4/offlineimap/repository/IMAP.py",
  line 192, in getfolders
    listresult = imapobj.list(directory =
    self.imapserver.reference)[1]
  File "/usr/lib/python2.4/imaplib.py", line 469, in list
    typ, dat = self._simple_command(name, directory, pattern)
  File "/usr/lib/python2.4/imaplib.py", line 1028, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/usr/lib/python2.4/imaplib.py", line 787, in _command
    raise self.error(
error: command LIST illegal in state NONAUTH
2009-04-21 00:03:28 -05:00
John Goerzen
7884de84c9 Fixed typos thanks to Alexey Mahotkin 2009-04-21 00:01:01 -05:00
Nicolas Sebrecht
6b94ee69c5 gitignore generated files from 'make doc'
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2009-04-17 10:37:48 -05:00
Nicolas Sebrecht
e5deec0960 'make clean' remove manual.ps
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2009-04-17 10:37:37 -05:00
John Goerzen
9e08556529 Add IDLE support from James Bunton
Merge branch 'bunton'
2009-02-12 20:22:32 -06:00
James Bunton
17ec4df02a Added check for IDLE in capabilities 2009-02-10 16:19:55 +11:00
James Bunton
8cd2bdf7f5 Allow keepalive to be overridden by user if imapfolders is set 2009-02-10 15:57:03 +11:00