Commit Graph

2374 Commits

Author SHA1 Message Date
Nicolas Sebrecht 39b657194a XOAUTH2: don't try this authentication method when not configured
Checking if we have to run this authentication method once it's already passed
to imaplib2 is too late. Make the checks at correct time, before we try the
authentication method. IOW, before we call

  imapobj.authenticate('XOAUTH2', self.__xoauth2handler)

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/442
Tested-by: Klemens Schölhorn <klemens@schoelhorn.eu>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-27 21:17:25 +02:00
Maximilian Kaul 4ac44071b6 Fixed typo in doc: tls_1_2 => tls1_2
tls1_2 matches the string in offlineimap/bundled_imaplib2.py and
offlineimap fails when using tls_1_2:
("Invalid SSL version 'tls_1_2' requested for tls_version 'tls_secure'",)

Signed-off-by: Maximilian Kaul <maximilian+git@maximiliankaul.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-27 19:20:25 +02:00
Nicolas Sebrecht e8f0e82f6c IMAP: UIDPLUS: correctly warn about weird responses from some servers
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/455
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-26 19:39:04 +02:00
Nicolas Sebrecht e9d8e87a71 IMAP: UIDPLUS: improve error message on response error for new UID
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-26 18:40:51 +02:00
Ilias Tsitsimpis 7bc54d241c Acquire lock before updating the CursesLogHandler window
Make sure that we refresh the screen atomically, since the emit()
function may be called by more that one threads at a time.

Also, modify the draw_bannerwin() method which used to fail in case the
window would become too small. Make sure that the provided offsets to
the window.addstr() method are properly bounded.

Closes #160: blinkenlights display is broken
Tested-by: Cyril Brulebois
Tested-by: Gaudenz Steinlin
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-23 12:48:12 +02:00
Nicolas Sebrecht 2b1c842a7d website-doc: force copy of the new HTML generated man pages
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-21 21:03:14 +02:00
Nicolas Sebrecht 76ca65e0b2 Makefile: fix clean target
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-21 21:02:54 +02:00
Nicolas Sebrecht 33a7f3c14c MAINTAINERS: benutzer193 joins the testers team
Welcome!

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-20 11:18:00 +02:00
Nicolas Sebrecht 874106d3bd docs: learn to build html files for the manual pages
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-17 20:54:10 +02:00
Nicolas Sebrecht a4c887e5b1 website-doc.sh: add hint on API removal
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-16 01:30:31 +02:00
Nicolas Sebrecht a92b116a4f README: refactorize sections
I've decided to remove the historical and emblematic excerpt:

> It is fast.
> It is reliable.
> It is flexible.
> It is safe.

Not because we don't match them anymore but because there are known competitive
alternatives nowadays.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-16 01:02:52 +02:00
Nicolas Sebrecht f669b3ea2f v7.1.0
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-16 00:40:54 +02:00
Nicolas Sebrecht 2c6fac6449 folder/IMAP: improve handling of "matchinguids" error while searching headers
Raise OfflineImapError instead of ValueError.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/452
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-07 20:27:39 +02:00
benutzer193 e88a6bcf03 Adjust README to systemd service file changes
Signed-off-by: benutzer193 <registerbn@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-28 18:17:12 +02:00
benutzer193 11c6995ac2 Remove oneshot switch from systemd services
Signed-off-by: benutzer193 <registerbn@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-28 18:17:12 +02:00
benutzer193 1462d0994a Use oneshot services for systemd timers
Signed-off-by: benutzer193 <registerbn@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-28 18:17:12 +02:00
benutzer193 bf85746923 Create systemd oneshot services
Signed-off-by: benutzer193 <registerbn@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-28 18:17:12 +02:00
Nicolas Sebrecht c8206f24e1 remove support for the status_backend configuration option
Stop the run when this option is found. Migrating from the historical plain
text status cache is still supported.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-25 13:47:30 +01:00
Nicolas Sebrecht 49c6f14ce4 README: we moved to imaplib2 v2.57
Declare support from imaplib2 v2.57.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-23 18:36:45 +01:00
Nicolas Sebrecht 1670505780 README: mark porting to py3 as stalled
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-23 18:35:47 +01:00
Ilias Tsitsimpis eb7651898e doc: Fix typo in offlineimap.1 man page
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-23 17:19:10 +01:00
Nicolas Sebrecht ebf5fd527e folder: UIDMaps: ignore KeyError failure while removing keys
This would require more digging to understand how this is possible. I suspect
that a previous run has been interrupted.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/445
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-22 14:33:31 +01:00
Nicolas Sebrecht 5fa0340f9d website-doc.sh: versions.yml: set versions in order
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-11 13:42:52 +01:00
Nicolas Sebrecht c883160814 v7.0.14
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-11 13:22:18 +01:00
Nicolas Sebrecht f9360ba2d7 bump from imaplib2 v2.55 to v2.57
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-03-05 13:28:47 +01:00
Nicolas Sebrecht fc079499e9 prevent synchronization of identical folders from multiple threads
Use a mutex to lock the sync transaction, uniquely identified by the remote
folder name.

Serializing the syncs prevents any IDLE thread from syncing the same folder of
a concurrent autorefresh thread. Othewise, we could download new messages
twice, or read "one message past the last one" which in some cases creates a
duplicated messages.  Also prevents IDLE threads from reading new messages
before the autorefresh thread finishes synchronization.

Github-ref: #421
Originally-submitted-by: Michael Hohmuth <hohmuth@sax.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-02-28 19:16:18 +01:00
Nicolas Sebrecht 04cb32bf9e MAINTAINERS: add new tester
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-02-20 01:06:56 +01:00
Stéphane Graber e3bbf75feb Fix ipv6 configuration handling
According to documentation and the code, the following behavior is expected:

ipv6 = no
    AF_INET is used

ipv6 = yes
    AF_INET6 is used

ipv6 undefined
    AF_UNDEF is used

Unfortunately the code parsing the "ipv6" configuration option was
returning "False" rather than "None" when failing to locate the option,
making it impossible to detect whether "ipv6" isn't set or if it was set
to "false" and leading offlineimap to use AF_INET for the connection.

This fixes the use of offlineimap on hosts that occasionaly are
connected to IPv6-only networks.

Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-02-03 18:43:02 +01:00
Nicolas Sebrecht 4df06d57c3 SQLite: avoid concurrent writes on backend migration
The saveall() method must acquire the lock to make writes.

Reported-and-tested-by: Julien Cubizolles <j.cubizolles@free.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-31 17:59:25 +01:00
Nicolas Sebrecht 23b497d191 scripts/get-repository.sh.rej: remove unused file
Was accidentally added in 7c7d693bd5.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-31 01:01:53 +01:00
Jens Heinrich 7c7d693bd5 scripts/get-repository.sh: use portable /bin/sh
Signed-off-by: J <offlineimap@927589452.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-30 18:02:24 +01:00
927589452 2c77e00946 update MAINTAINERS.rst
update J's entry with github

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-28 19:30:03 +01:00
mailinglists@927589452.de b143f63031 scripts/get-repository.sh: use env to call bash
This makes invocation of bash crossplatform.

Signed-off-by: J <offlineimap@927589452>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-28 19:22:05 +01:00
Nicolas Sebrecht c1df95b7d3 v7.0.13
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-27 19:49:42 +01:00
Nicolas Sebrecht c58b035cd1 add documentation about SIGABRT
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-27 19:41:47 +01:00
Nicolas Sebrecht 0991af6855 manual: KOWN ISSUES: add documentation about the deletions
We currently propagate the deletions if:

- the content of a folder was deleted;
- the parent directory of the folder was deleted.

The second case in incorrect and unexpected. This requires further work.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/426
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-25 13:38:09 +01:00
Nicolas Sebrecht ba52030923 folder: IMAP: improve error message when Dovecot returns any data for UID FETCH
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/429
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-24 19:11:16 +01:00
Nicolas Sebrecht 6c0828b77c folder: IMAP: add missing whitespace in error message
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-24 16:08:41 +01:00
Chris Smart eb2bd80851 init: register SIGABRT and handle as per SIGUSR2
systemd supports a watchdog (via the WatchdogSec service file option)
which will send the program a SIGABRT when the timer expires, however
currently this causes offlineimap to be killed immediately.

This patch registers SIGABRT and handles it in the same manner as
SIGUSR2, so that the current synchronisation is completed before the
program exits safely.

This makes offlineimap more flexible and robust for persistent setups
that make use of holdconnectionopen and autorefresh options.

For example, it may be useful in assisting with the occasional
situation where offlineimap may not return successfully after a suspend
and resume.

To make use of this, users could add the following to the [Service]
section of their systemd offlineimap service file (restart every 5
minutes):

Restart=on-watchdog
WatchdogSec=300

Signed-off-by: Chris Smart <mail@csmart.io>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-23 14:20:07 +01:00
Nicolas Sebrecht 11655cb613 repository: IMAP: correctly check the response while listing remote folders
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/423
Reported-by: Periklis Tsirakidis <periklis.tsirakidis@mayflower.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-01-22 19:20:32 +01:00
lkcl dab5737265 learn repository retrycount configuration option
Allow retrying the download of messages more than twice.

Signed-off-by: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-12-19 12:55:55 +01:00
lkcl dda27e0962 learn authproxy configuration option
Allow to use a another proxy for authentication than for IMAP.

Signed-off-by: Luke Kenneth Casson Leighton <lkcl@lkcl.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-12-19 12:20:19 +01:00
Nicolas Sebrecht da08ff2d01 release.sh: correctly sort releases to compute latest stable and rc
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-12-11 16:58:58 +01:00
Nicolas Sebrecht a92fa1084b MAINTAINERS: add new tester
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-12-02 23:46:02 +01:00
Nicolas Sebrecht 0b01ae3ab2 MAINTAINERS: add two new official testers
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 23:15:03 +01:00
Nicolas Sebrecht d5edf2dc11 v7.0.12
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 22:40:59 +01:00
Abdo Roig-Maranges 91486482cc repository: Base: fix typo in folder variable name
Probably fixes #417.

Signed-off-by: Abdo Roig-Maranges <abdo.roig@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 22:33:05 +01:00
Darshit Shah b5a4925efc Enable environment variable expansion on Repository.localfolders
Commit e51ed80e claims to add tilde and environment variable expansion
to multiple locations including Repository.localfolders. However, this
particular options seems to have been missed in that commit, and
apparently no one noticed till date

Signed-off-by: Darshit Shah <darnir@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 19:22:57 +01:00
Nicolas Sebrecht ed933f39e0 MAINTAINERS: minor: fix rendering
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 17:17:07 +01:00
Nicolas Sebrecht ed79e56f8e v7.0.11
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-11-30 14:33:44 +01:00