Commit Graph

1925 Commits

Author SHA1 Message Date
Nicolas Sebrecht ecef22a16c v6.7.0.3
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-26 08:46:22 +02:00
Nicolas Sebrecht 77a6f9a7ba LocalStatusSQLite: code refactoring around database lock
Backported-from: 05e5b9c6bb
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-26 02:58:09 +02:00
Nicolas Sebrecht 038a433f69 backport: sqlite: properly serialize operations on the databases
1. There is one database per folder and sqlite requires to serialize the
writings. Instead of locking at LocalStatusSQLiteFolder object level, introduce
a new DatabaseFileLock object which is shared across threads. This fixes the
concurrent writes issues that some users might experience by duplications or
flags restored to the previous state.

2. Close the database only when we are sure no other threads will use the
connection on a *per-file* basis. Previous fix 677afb8d8f is wrong
because the same lock is shared for all the databases.

Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-26 02:00:17 +02:00
Nicolas Sebrecht 41fdd4ee78 v6.7.0.2
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-22 16:34:04 +02:00
Nicolas Sebrecht 677afb8d8f sqlite: close the database when no more threads need access
It's required to have more than one connection to the database for the
maxconnections configuration option to work with threads. However,
connection.close() is closing all the connections. Only close the connection
when no more thread need it.

Backported-from: 856b74407bd7f634cae5a8c2d9b84e13d14c12d2
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-07-22 09:19:09 +02:00
Nicolas Sebrecht 8cca78b265 v6.7.0.1
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-06-08 02:02:32 +02:00
Nicolas Sebrecht 3f70d9ef37 sqlite: open database when we use it rather than at instantiation time
Backported from 8e995a69bfa003ab822b55731429d84b3bc5626f.

We currently close the database as soon as possible while we handle the status
backend but this is still too early because autorefresh induces looping on this
code block.

Instead of delaying the closing outside of the loop, it's easier to delay the
opening as late as possible (inside the loop). The downside is that the database
is opened/closed more than once when autorefresh is enabled. The good news is
that this make the code much easier.

Fixes regression introduces by 6fb5700.

Reported-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-06-08 01:59:39 +02:00
Nicolas Sebrecht b840e66d59 SQLite: close db when done
Backported from 6fb5700f94.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-06-08 01:59:14 +02:00
Nicolas Sebrecht cb8678a5b5 Merge tag 'v6.7.0' into maint
v6.7.0
2016-06-08 01:56:21 +02:00
Nicolas Sebrecht 8c7a7355a3 v6.7.0
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-10 17:08:18 +01:00
Nicolas Sebrecht 15efea24b9 .github/: improve templates
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-09 09:35:59 +01:00
Nicolas Sebrecht 8ed4f35fc8 introduce a code of conduct
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-07 13:36:33 +01:00
Ilias Tsitsimpis c84d23b656 Identify and fix messages with FMD5 inconsistencies
Introduce the '--migrate-fmd5-using-nametrans' option which migrates the
FMD5 hashes from versions prior to 6.3.5.

It seems that commit 'Apply nametrans to all Foldertypes' (6b2ec956cf)
introduced a regression because it changed the FMD5 part of the filename
calculated by OfflineIMAP. Thus, OfflineIMAP believes that the messages
has been removed and adds them back.

For more information, see:
http://www.offlineimap.org/configuration/2016/02/12/debian-upgrade-from-jessie-to-stretch.html

Bug-Debian: https://bugs.debian.org/812108
Reported-by: François <francois@avalenn.eu>
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-06 21:01:51 +01:00
Nicolas Sebrecht 334571038e minor improvement of github issue template
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-06 21:01:13 +01:00
Nicolas Sebrecht 2f541e4872 release.sh: move the authors section up
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-05 14:36:54 +01:00
Ben Boeckel d8398ba374 Curses, UIBase: remove references to __bigversion__
__bigversion__ was removed in 281bcefb52.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-05 06:47:24 +01:00
Nicolas Sebrecht 29a7dbd51b sphinx doc: remove usage of __bigversion__
Fix regression introduced by 281bcef.

Reported-by: mathstuf
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-04 22:33:16 +01:00
Nicolas Sebrecht 06881f9a71 README: add slogan
Thanks-to: Norbert Preining
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-03-02 15:36:22 +01:00
Nicolas Sebrecht 3b249dad14 Merge branch 'ns/github' into next 2016-02-28 19:01:37 +01:00
Nicolas Sebrecht 90afb1b338 add github templates
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-28 18:59:10 +01:00
Nicolas Sebrecht 8b661eb58e MAINTAINERS: update
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-27 20:10:34 +01:00
Nicolas Sebrecht f0a585b02f release.sh: add pypi instructions
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-27 05:35:09 +01:00
Nicolas Sebrecht c549af78eb pypi requires a setup.cfg when README is Markdown
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-27 05:34:46 +01:00
Nicolas Sebrecht 543890e257 MANIFEST: exclude rfcs
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-27 05:25:09 +01:00
Nicolas Sebrecht d0cdd42d09 Merge tag 'v6.5.7' into maint
v6.5.7

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-24 01:36:07 +01:00
Nicolas Sebrecht 07b6c895c5 release.sh: improve release annoucements
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-23 11:18:10 +01:00
Nicolas Sebrecht 208f555230 Merge branch 'earies-ipv6' into next 2016-02-23 07:11:25 +01:00
Nicolas Sebrecht e51b828013 add documentation for the ipv6 configuration option
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-23 07:09:53 +01:00
Ebben Aries 9bfd610230 change hard coding of AF_UNSPEC to user-defined address-families per repository
Some environments that return AAAA records for their IMAP servers can pose
problems for clients that do not have end-to-end IPv6 connectivity for a number
of reasons (e.g. policy, lack of full routing, security, etc..)

Even with a fallback mechanism in place, you can still arrive at IMAP
implementations that could prevent authentication from unknown IPv6 space. This
in itself is not enough to fallback to IPv4 since there is an actual connection
on that socket.

This change is for introducing a user-defined value:

  [Repository imap-remote]
  ipv6 = no

to create a preference per repository on which AF to connect to the remote
server on

ipv6 = yes (AF_INET6)
ipv6 = no (AF_INET)
unspecified = default

Signed-off-by: Ebben Aries <e@dscp.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-23 06:57:21 +01:00
Nicolas Sebrecht 8f94ef1973 release: add command to install from pip in the announces
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-22 13:04:16 +01:00
Nicolas Sebrecht b0cf523ba7 Changelog: fix typo
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-22 12:48:18 +01:00
Nicolas Sebrecht 893a90c291 v6.7.0-rc2
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-22 12:47:42 +01:00
Nicolas Sebrecht 9fe337d4fb fix year of copyright
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-22 12:24:15 +01:00
Nicolas Sebrecht 281bcefb52 versioning: avoid confusing pip by spliting out __version__ with __revision__
Python tools are not used to a __revision__.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-22 12:14:49 +01:00
Nicolas Sebrecht 36375daee6 fix: exceptions.OSError might not have attribute EEXIST defined
Since this is used in an except calse, we first don't mask the real cause and
raise the original error.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-19 12:33:57 +01:00
Nicolas Sebrecht 36165e391f update links to the new URL www.offlineimap.org
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-19 12:10:23 +01:00
Ray Song b670bb2022 XOAUTH2 handler: urlopen with proxied socket
Signed-off-by: Ray Song <i@maskray.me>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-15 11:14:50 +01:00
Aaron C. de Bruyn 015ec2ada4 manual: small grammar fix
Sent-by: Aaron C. de Bruyn <aaron@heyaaron.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-10 19:27:27 +01:00
Ilias Tsitsimpis 37bcd45e4e Abort after three Ctrl-C keystrokes
By default, OfflineIMAP catches SIGTERM/SIGHUP/SIGINT and attempts to
gracefully terminate as soon as possible. Allow the user to abort
immediately, by hitting Ctrl-C several times.

Bug-Debian: https://bugs.debian.org/679975
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-04 15:30:14 +01:00
Ilias Tsitsimpis 3174ea0bd3 Fix typos in offlineimap(1) manpage
Signed-off-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-02-04 15:28:31 +01:00
Nicolas Sebrecht 426905ba85 v6.7.0-rc1
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:47:14 +01:00
Nicolas Sebrecht d5bd6dd5dd declare newmail_hook option stable
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:31:26 +01:00
Nicolas Sebrecht 70708e2b6f declare utime_from_header option stable
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:24:07 +01:00
Nicolas Sebrecht e5580ddba9 decode foldernames is removed EXPERIMENTAL flag
Introduce warnings because I'm not using this feature and encoding issues might
be a nightmare to fix. I'm not ready to support this.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:21:33 +01:00
Nicolas Sebrecht 65d2c6938a declare XOAUTH2 stable
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:16:25 +01:00
Nicolas Sebrecht 64763b0645 declare tls_level option stable
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:15:23 +01:00
Nicolas Sebrecht 94fbe8773d declare IMAP Keywords option stable
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-24 19:14:12 +01:00
Nicolas Sebrecht 1553e843b3 Revert "Don't output initial blurb in "quiet" mode"
This reverts commit a1dc76ae91.

Causes a crash when using Blinkenlights UI with -l CLI option.

  $ ./offlineimap.py -c offlineimap.conf.minimal -u blinkenlights -l foo
  Traceback (most recent call last):
    File "./offlineimap.py", line 36, in <module>
      oi.run()
    File "/tmp/offlineimap/offlineimap/init.py", line 50, in run
      options, args = self.__parse_cmd_options()
    File "/tmp/offlineimap/offlineimap/init.py", line 205, in __parse_cmd_options
      self.ui.setlogfile(options.logfile)
    File "/tmp/offlineimap/offlineimap/ui/UIBase.py", line 119, in setlogfile
      self.logger.info(msg)
    File "/usr/lib/python2.7/logging/__init__.py", line 1159, in info
      self._log(INFO, msg, args, **kwargs)
    File "/usr/lib/python2.7/logging/__init__.py", line 1278, in _log
      self.handle(record)
    File "/usr/lib/python2.7/logging/__init__.py", line 1288, in handle
      self.callHandlers(record)
    File "/usr/lib/python2.7/logging/__init__.py", line 1328, in callHandlers
      hdlr.handle(record)
    File "/usr/lib/python2.7/logging/__init__.py", line 751, in handle
      self.emit(record)
    File "/tmp/offlineimap/offlineimap/ui/Curses.py", line 305, in emit
      color = self.ui.gettf().curses_color
  AttributeError: 'CursesLogHandler' object has no attribute 'ui'

Reported-by: iliastsi
Github-issue: #293
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-01-08 17:33:00 +01:00
ojab cfa704bbf2 Allow authorization via XOAUTH2 using access token
Signed-off-by: Slava Kardakov <ojab@ojab.ru>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-12-30 00:25:57 +01:00
Nicolas Sebrecht 72850e3c23 fix Changelog
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2015-12-28 01:41:45 +01:00