05e5b9c6bb
LocalStatusSQLite: code refactoring around database lock
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-26 02:56:36 +02:00
3c42913120
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 instance 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 database files.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-26 01:57:25 +02:00
5aa2a883f0
local status: deletemessagelist: remove broken code
...
This did not work and is not usefull since the purge() method was introduced in
1410a391bc
. Actually, the purge() does what deletemessagelist() was supposed to
achieve.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-25 15:06:39 +02:00
fbc3b15888
IMAP/IMAP: fix import issue about UIDMaps
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-25 05:26:57 +02:00
03859e89c3
improve error message when ssl_version must be set due to the tls_level
...
Improve the ssl documentation.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-25 03:29:25 +02:00
c992f58530
offlineimap.conf: allow non-spaces in the account list
...
Regression introduced in v7.0.0.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/355
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-24 19:39:43 +02:00
284c66b04a
v7.0.0
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-22 16:56:43 +02:00
e753766284
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.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-22 16:30:38 +02:00
034c55a278
--info: allow user to enter a password
...
Change from basic UI to ttyui.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/352
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-22 01:44:38 +02:00
59b712ecbc
remove dead code: the description of the passes is never used
...
Some minor style fixes.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-18 18:41:41 +02:00
80dcf76414
fix attribute name _utime_from_header
...
Code style.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-16 21:25:14 +02:00
59f5da5e9e
Maildir: OfflineImapError is missing the severity argument
...
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/350
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-16 18:02:01 +02:00
1a96d588d5
fix: configparser does not know about python types like u""
...
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/347
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-13 14:02:25 +02:00
742e53a4b4
v7.0.0-rc5
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-12 16:15:33 +02:00
ff0c1a2efc
--help: make it clear --delete-folder is for the remote repository
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-09 02:11:36 +02:00
3f059c638a
--help: move -V option up
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-09 01:28:51 +02:00
2e81331a3c
learn --delete-folder CLI option
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-08 21:34:25 +02:00
bb8e03bced
init: factorize code to get active accounts
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-08 21:34:25 +02:00
d2dbe2c544
mbnames: enable action at correct time
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-08 21:31:30 +02:00
175479d919
mbnames: fix the filename extension for the intermediate files
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-06 01:15:33 +02:00
b3209e38c0
mbnames: output message on errors while reading intermediate files
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-06 00:38:43 +02:00
218b3802c0
v7.0.0-rc4
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-04 04:05:37 +02:00
44a8cf3feb
threadutil: use 'with' statements for lock
...
Improve code for waiting the accountThreads.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:03:14 +02:00
29e06a60f9
learn to not download UIDs defined by the user
...
Allow users to workaround offending emails that offlineimap can't download.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:02:45 +02:00
f0096391fc
folder: IMAP: fix wrong comment
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:02:45 +02:00
1086d0dd69
minor: improve "Copy message" output
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:02:45 +02:00
f4210dc11c
folder: IMAP: improve style of comments
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:02:45 +02:00
296c8a6146
UIDMaps: correctly protect from concurrent writes
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:00:21 +02:00
cd43cd5b3b
UIDMaps: code cleanups and improvements
...
- Use more 'with' statements.
- Remove dead code: 'dolock' was never used.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 20:00:21 +02:00
c32b409413
UIDMaps: fix copyright line and re-order imports
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:58:45 +02:00
7945e10a76
correctly reraise errors with six
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:56:14 +02:00
69c0080323
learn --mbnames-prune CLI option
...
This is usefull to remove dangling entries for removed accounts or if mbnames is
not enabled anymore.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:54:41 +02:00
4ef05fe6e1
minor: init: re-order imports
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:54:13 +02:00
932e826d7c
folder: Maildir: add comments about FMD5 issues
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:53:45 +02:00
6b28071b0f
don't sync folders with local separator characters in their names
...
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/148
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-07-03 19:52:34 +02:00
548a6a57f1
folder: Gmail: use consistent copyright line
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-28 02:29:30 +02:00
38f28d15aa
v7.0.0-rc3
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-27 15:47:26 +02:00
1da5bd938c
folder: Base: fix line continuation
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-27 15:27:11 +02:00
65d4c94f07
don't try to copy messages with UID == 0
...
Output a warning so that we can dig into this. For now, the patch doesn't fix
the root cause. If the server returns UID 0 as valid UID number, this must be
ignored as soon as possible.
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/336
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-27 15:13:03 +02:00
9a7603af37
minor: folder: Base: improve style and comments
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-27 15:03:27 +02:00
e8509a04e6
remove dead code
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-26 17:09:03 +02:00
cf5698b6a6
repository: IMAP: minor improvements
...
Make it clear what value is the default.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-26 17:02:28 +02:00
ac2a547ec4
learn to disable STARTTLS
...
Some servers might have this feature broken.
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/207
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-26 17:01:01 +02:00
1410a391bc
avoid removing of data when user removed a maildir
...
When a maildir is removed it must be considered new for the sync. However, the
local cache of the folder remains. This means the sync of the folder removes all
the missing emails.
Avoid loosing of data for users not aware of the local cache by removing any
pre-existing status cache of a folder when we actually want to create the
database.
Improve style.
Github-fix: https://github.com/OfflineIMAP/offlineimap/issues/333
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-26 17:00:23 +02:00
08e17de7e2
require usernames and passwords to be UTF-8 encoded
...
- Learn to support UTF-8 characters where it was not supported for usernames and
passwords (but for netrc).
- Fix the types in the code for both py2 and py3: we now expect unicode for
usernames and passwords.
Unicode (UTF-8) is required only for variables with non-ASCII characters.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-26 16:57:22 +02:00
092264c8e7
fix: when called with -a, mbnames must not erase entries of other accounts
...
Make mbnames to work with intermediate files, one per account, in the JSON
format. The mbnames target is built from those intermediate files.
Github-Fix: https://github.com/OfflineIMAP/offlineimap/issues/66
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-25 17:33:42 +02:00
3a5becf6a7
bump from imaplib2 v2.53 to v2.55
...
- Expose more literals.
- Fix a type to bytes.
- Fix comment.
Changes submitted upstream by Łukasz and me.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-11 11:08:02 +02:00
e3fe848c6b
minor code cleanups
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-08 19:03:02 +02:00
7fcd160911
GmailMaildir: quick mode is not compatible with utime_from_header
...
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-08 19:02:04 +02:00
8c9f63a9b5
repository/IMAP: add minor comment
...
Some minor cleanups on whitespaces.
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net >
2016-06-08 16:01:58 +02:00