Work in Progress.
For all Bronze and Silver Sponsors, this page is supposed to show sponsoring company logo and link to sponsoring company website, also for Silver, same on sponsors page of our website.
Gold and Platinum go in `README.md` and on front page of our website.
I saw the top line, and the requirement for `six`, and took that to mean that Python 3 was supported. After wasting some of my time setting up and dealing with opaque bugs, I discovered that Python 3 is not supported after all.
"2.7+" implies modernity, so I'm suggesting we substitute "2.7.x" to be explicit that this is Python 2 only, and strike through the Python 3 line to be blunt that it is not working.
This patch only adds an space between the hash and the first character.
Backported from:
a88a9cf28e
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
`presynchook` and `postsynchook` for IDLE-triggered syncs were broken by
da69fd8. This fixes them.
Signed-off-by: Reto Schnyder <reto.a.schnyder@bluewin.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
When the IMAP server doesn't support the UIDPLUS extension so we fallback on the
internal legacy way of mapping the UID to the uploaded message (with the email
header). If the server responds with 2 UIDs offlineimap doesn't know which one
is correct and reports an error.
If for some reason all the returned UIDs are equals it's very likely fine to
map either one.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tested-by: https://github.com/mpsq
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/676
When an user installs offlineimap from PyPI using pip, the dependencies
of offlineimap are not installed automatically. See #661.
Requiring explicitly the dependencies in the setup.py adds them in the
metadata of the package so pip can install them next with offlineimap.
To avoid duplicated dependencies, requirements.txt delegates to setup.py
the listing of the minimal dependencies while also adding two more
optional dependencies.
Signed-off-by: Martin Di Paola <martinp.dipaola@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
The setup.py uses the version, author and others attributes as metadata
for the python package.
The setup read them from offlineimap/__init__.py doing an import of the
module first.
Unfortunately the import also try to import all the dependencies of
offlineimap which may not be installed by the time. See #661.
Moving out the attributes in a separated module allows to be imported by
setup.py whitout needing to import the whole offlineimap.
The import of test.OLItest has the same limitation. In this case the
import was delayed until the real test case run is executed avoiding
again loading offlineimap from the begin.
Signed-off-by: Martin Di Paola <martinp.dipaola@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Inside __authn_gssapi function, the else clause is never executed
because the return statement in the try section, which means if there is
an error and a reconnect is tried, the authentication will now fail with
due the stale self.gss_vc value. For example, offlineimap will be
stuck after any socket error and unable to reconnect, even if I have a
valid kerberos ticket:
========================================================================
abort: command: FETCH => socket error: <type 'exceptions.IOError'> - Too many read 0
command: FETCH => socket error: <type 'exceptions.IOError'> - Too many read 0
GSSAPI authentication failed: AUTHENTICATE command error: BAD ['AUTHENTICATE aborted']. Data: BLMC2 AUTHENTICATE GSSAPI
Enter password for user 'XXX':
========================================================================
You can verify this try..finally behaviour with this slightly modified
example that I copied from python documentation:
>>> def divide(x, y):
... try:
... result = x / y
... return 1
... except ZeroDivisionError:
... print("division by zero!")
... else:
... print("result is", result)
... finally:
... print("executing finally clause")
...
>>> divide(2, 1)
executing finally clause
1
>>>
The else section is never executed with a return inside try.
To fix the issue here, instead of relying on else clause, just clear
gss_vc always inside finally, and we don't need to handle any exception
to set self.gssapi, it can be left False by default and just set to True
after authentication is done.
I'm running with this fix and now offlineimap doesn't stop requiring manual
intervention, and succesfully re-authenticate after errors while fetching
data.
Signed-off-by: Herton R. Krzesinski <herton@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit allows account hooks (pre/post sync) to access contextual
information:
* `OIMAP_ACCOUNT_NAME`: name of the account being synchronized
* `OIMAP_HOOK_NAME`: name of the hook being run (one of `postsynchook`, `presynchook`)
These variables allow using the same hook program (e.g. a script) for
all account synchronisation operations, and running different commands
depending on the stage of the synchronisation or the target account.
Signed-off-by: Frank LENORMAND <lenormf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
There is no reason that the shell invoking the tunnel command needs to stay
around. Using `exec` to replace the parent with the tunnel command works just
fine and results in a cleaner process table.
Sent-by: martin f. krafft <madduck@madduck.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Make compatible with IMAP servers that give the reason code "[ALREADYEXISTS]"
and IMAP servers that give natural language reason "Mailbox already exists!" by
searching for the two words "already" and "exists" in the exception reason
string.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
On some architectures, using threading.TIMEOUT_MAX for the timeout
parameter can overflow causing Condition.wait() to return immediately.
Instead of relying on TIMEOUT_MAX, remove it and wait forever.
Signed-off-by: Ilias Tsitsimpis <iliastsi@debian.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
While trying to see why I couldn't get my emails from an Exchange server
I found this:
[imap]: 41:31.42 someserver.com handler _put_response(IOMC1 OK)
[imap]: 41:31.42 someserver.com handler unexpected response: 'IOMC1 OK'
And shortly after that the connection was closed. IOMC1 is just the
unique tag for the session.
The pattern looks for the tag, a number, a word like "OK" or something,
*then a space*, then optionally some data.
If the data aren't there it shouldn't be expecting a space.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>