Commit Graph

358 Commits

Author SHA1 Message Date
John Goerzen
4e19af1513 Fix non-SSL connection
fixes deb#432727
2007-07-12 11:02:19 +01:00
John Goerzen
09d71143d7 Fix version.py importing 2007-07-10 12:57:03 +01:00
John Goerzen
84d1662482 Update changelog 2007-07-11 02:50:30 +01:00
Florian Friesdorf
3e7899a9dc IMAP.py: fixed cannot concatenate 'str' and 'list' in assert
r[1] is a list. In case it contains more than one 'str' they are concatenated
using '. '. In processmessagesflags the join is tested, for savemessagesflags I
assume that it is also needed.
2007-07-07 04:51:02 +01:00
Florian Friesdorf
ed005cbbdc UIBase config variable fix
Code is probably reached for the first time, thanks to the correct readonly
handling patch
2007-07-07 02:30:42 +01:00
John Goerzen
acc597ff28 Write current PID to ~/.offlineimap/pid
fixes deb#217550
refs deb#410181
2007-07-07 01:50:43 +01:00
John Goerzen
a381ca3977 Re-scan list of remote folders on each sync
rather than just up-front.

fixes deb#396772
2007-07-06 17:46:29 +01:00
John Goerzen
f0d48365cf Added timeouts 2007-07-06 17:37:58 +01:00
John Goerzen
4370da1dcf UNDO: Checkpointing 2007-07-05 14:49:54 +01:00
John Goerzen
7a287cef57 Checkpointing 2007-07-05 14:49:54 +01:00
John Goerzen
1af12e99a1 Tweaks to machine 2007-07-05 14:22:57 +01:00
John Goerzen
c6f01fb3c8 Machine now runs 2007-07-05 14:21:33 +01:00
John Goerzen
8da3012857 Added Machine.py 2007-07-05 12:05:06 +01:00
John Goerzen
9bee28cb13 Implement connect 2007-07-05 05:04:14 +01:00
John Goerzen
8200864f25 Retabified 2007-07-04 22:00:14 +01:00
John Goerzen
4b10e30d81 Added comment 2007-07-04 19:34:02 +01:00
John Goerzen
4867d81ca4 Correct readonly handling
Upstream imaplib now issues EXAMINE when readonly != None
offlineimap/imaplib.py's version always used SELECT
2007-07-04 19:19:06 +01:00
John Goerzen
691386b3d7 Compilation fixes 2007-07-04 19:17:27 +01:00
John Goerzen
196f35e972 Update version info 2007-07-04 19:17:14 +01:00
John Goerzen
abf9648fd8 Clean up imaplib imports 2007-07-04 18:53:48 +01:00
John Goerzen
1b9fa9ff9a Switch to imaplibutil Internaldate2Epoch 2007-07-04 18:51:57 +01:00
John Goerzen
91392b7578 Merging imaplibutil into code 2007-07-04 18:51:10 +01:00
John Goerzen
d352e034cc Remove local imaplib.py 2007-07-04 18:38:02 +01:00
John Goerzen
96fd233355 Start of work pulling code out of imaplib.py 2007-07-04 18:36:33 +01:00
John Goerzen
1e90e0fd78 Remove the Tk interfaces
These were a constant source of trouble.  Tkinter likely has multiple
memory leaks that OfflineIMAP was tickling.  I never used these, so poof,
goodbye.
2007-07-04 17:57:09 +01:00
Asheesh Laroia
35e7250187 only-write-once-to-cur-or-new.patch
I have tested this and Dovecot no longer beats offlineimap
to the punch. (-:

I achieved that by keeping the renames in tmp/ until it finally does
one last rename in new/ or cur/.
2007-06-13 04:42:15 +01:00
John Goerzen
799c867a4d Removed "print af" statements from imaplib.py
they were introduced by patch "Check all resolved addresses [deb #413030]"
and were screwing up the curses display.

refs deb#413030
2007-03-28 21:38:37 +01:00
John Goerzen
aca2a4458b UNDO: Added netrc support
thanks to bboissin plus offlineimap at gmail dot com
refs #14
2007-03-27 08:21:17 +01:00
John Goerzen
4f54887265 Improve filesystem flushing semantics
fsync the Maildir file, its final directory when writing a new message.

fsync the localstatus file and its final directory when writing the 
local status cache.

This should reduce duplication in the event of hardware trouble.

fixes #8

see thread at http://lists.complete.org/offlineimap@complete.org/2007/03/threads.html.gz
2007-03-28 21:23:18 +01:00
John Goerzen
4b564bd568 Added netrc support
thanks to bboissin plus offlineimap at gmail dot com
refs #14
2007-03-27 08:21:17 +01:00
David Favro
65a6b8aa81 Removed copyright notice; assigning copyright to John Goerzen 2007-03-16 03:45:28 +01:00
David Favro
82c215023c Removed copyright notice; assigning copyright to John Goerzen 2007-03-16 03:44:54 +01:00
David Favro
b06845fc70 UID validity diagnostics improvement
* Reduced the number of parameters passed to ui.validityproblem() because they were all just method-calls to the folder object, which is already passed as the first parameter (reduction of unnecessary complexity).

* Improved the diagnostic message for an 'UID validity problem' by including the name of the repository in which the folder resides; previously it was not possible to determine from the diagnostic alone on which side the problem was.
2007-03-15 05:41:43 +01:00
David Favro
657b470d74 UID validity diagnostics improvement
* Reduced the number of parameters passed to ui.validityproblem() because they were all just method-calls to the folder object, which is already passed as the first parameter (reduction of unnecessary complexity).
2007-03-15 05:39:15 +01:00
John Goerzen
79a596be7b Don't leave preauthtunnel zombies with autorefresh
From: Peter Colberg

Hello,

using offlineimap with the preauthtunnel option to start a remote
IMAP daemon via ssh, a zombie process is left behind during the
autorefresh sleep period if not holding the connection open.

Above behaviour is a result of using os.popen2 to spawn the tunnel
process, which makes it impossible waiting for the child process
to terminate when shutting down the tunnel.

The patch included below fixes the issue by employing the Popen
class from the subprocess module, which seems to be the preferred
way to spawn processes and connect to their pipes in any case (at
least since python version 2.4.4, which fixes a memory leak in the
subprocess module).

Regards,
Peter

fixes deb#410730
2007-03-14 02:54:19 +01:00
John Goerzen
82d5d5e675 Check all resolved addresses [deb #413030]
From: Mark Brown <broonie@sirena.org.uk>
Currently offlineimap will attempt to connect to the first address
returned by addrinfo() for the remote system and will fail if that fails
even if another result would have worked.  This is particularly common
when the remote system supports both IPv4 and IPv6 - a laptop may in
some environments have no routable IPv6 connectivity so if the IPv6
address is returned first the connect will fail even though IPv4 would
have worked.

This is actually a bug in imaplib, a copy of which is included in
offlineimap.  This patch fixes the problem by looping over all the
results returned by getaddrinfo().  Unfortunately it mangles the error
reporting slightly since I couldn't work out how to raise an appropriate
exception, though given that that that was a Python backtrace there was
work to do there anyway.

Note that I have only tested the SSL case.
2007-03-08 02:59:32 +01:00
John Goerzen
ca3a306ecc --help shows available UIs now
Thanks to Daniel Rall for the patch.
fixes #5
2007-01-11 10:15:06 +01:00
John Goerzen
2d9c1ed9b8 Updating version number to 4.0.16 2006-12-02 21:59:02 +01:00
John Goerzen
aa019172cb Handle rtime being Null when writing to Maildir
fixes #2
debian #401290
2006-12-02 21:54:26 +01:00
John Goerzen
c31f60f8df Update copyright date in Maildir.py 2006-12-02 21:54:15 +01:00
Daniel Burrows
1844cefd17 Remove a redundant (and mostly harmless) output of the error string from the Curses UI.
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.
2006-12-01 12:27:12 +01:00
Daniel Burrows
dc8f3c944d Add a try: block to catch exceptions that occur before the main loop and to call ui.mainException().
I'm not sure if this is the "right" way to handle exceptions, but it does
correctly print the error message AFTER shutting down curses for me.
2006-12-01 11:59:22 +01:00
Daniel Burrows
c7894a01f0 Instead of blowing up when the account name is missing, display a useful error message that gives the correct account names. 2006-12-01 11:54:25 +01:00
Daniel Burrows
0ee7dfd435 Add parameters to terminate() that specify an (optional) error message to display on termination. 2006-12-01 11:54:12 +01:00
John Goerzen
2977f53244 Fix lack of revstr in version.py 2006-11-30 12:23:18 +01:00
John Goerzen
f2515a0b02 Updated copyright and version info for 4.0.15 2006-11-30 10:51:14 +01:00
John Goerzen
fc4e31e0db Updated homepage, refs #1 2006-11-30 10:46:51 +01:00
John Goerzen
f75a89d954 Updated copyright and version info 2006-10-19 02:04:28 +01:00
John Goerzen
a6db99a21e Add remote{host,user,pass}eval config options (need documentation yet)
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.
2006-10-17 20:55:03 +01:00
John Goerzen
89e530ff6e New restoreatime patch from Ben Kibbey
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.
2006-09-06 02:33:07 +01:00