Commit Graph

1823 Commits

Author SHA1 Message Date
Rodolfo García Peñas (kix)
d5ab101cf4 ui/UIBase.py do not use builtin type as variable
Renamed from type to rtype.
2020-08-30 18:10:51 +02:00
Rodolfo García Peñas (kix)
833816cf62 ui/UIBase.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 18:09:32 +02:00
Rodolfo García Peñas (kix)
b1a719ad9e ui/UIBase.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 18:07:59 +02:00
Rodolfo García Peñas (kix)
5ad87efb84 ui/UIBase.py removed extra characters
These chars could be removed.
2020-08-30 18:06:14 +02:00
Rodolfo García Peñas (kix)
d4f9d101c4 ui/Machine.py Removed extra parenthesys
This parsys should be removed.
2020-08-30 18:00:49 +02:00
Rodolfo García Peñas (kix)
f78c8e1ef4 ui/Machine.py Renamed list argument
The list is a standard word for list. This variable should have other
name.
2020-08-30 17:58:53 +02:00
Rodolfo García Peñas (kix)
edb6563a11 ui/Machine.py changed argument s to self
The standard name is self, not s.

I reformat the file after this change.
2020-08-30 17:57:46 +02:00
Rodolfo García Peñas (kix)
7634ce10d1 ui/debuglock.py Removed extra backslashes
These backslashes could be removed.
2020-08-30 17:47:18 +02:00
Rodolfo García Peñas (kix)
cfce5c8500 BUG: Do not sort accounts
Is not possible to sort acounts on this way. We need make the comparison
using their names, not their keys.
2020-08-30 17:42:52 +02:00
Rodolfo García Peñas (kix)
6bf45233bb ui/Curses.py avoid multiple statements in one line 2020-08-30 15:59:21 +02:00
Rodolfo García Peñas (kix)
5ebbba2995 ui/Curses.py updated docstring
This patch includes a param in docstring.
2020-08-30 15:56:49 +02:00
Rodolfo García Peñas (kix)
10c37cf7a4 ui/Curses.py unused variable
This variable is not used.
2020-08-30 15:54:20 +02:00
Rodolfo García Peñas (kix)
a69ef4325a ui/Curses.py removed extra characters
These characters could be removed.
2020-08-30 15:50:01 +02:00
Rodolfo García Peñas (kix)
ccbe42fb64 repository/Maildir.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 14:25:55 +02:00
Rodolfo García Peñas (kix)
9779d5444a repository/IMAP.py Removed initialitation
We don't need initialite this variable here.
2020-08-30 14:21:04 +02:00
Rodolfo García Peñas (kix)
78b010d149 repository/IMAP.py Removed extra characters
These characters can be removed.
2020-08-30 14:19:34 +02:00
Rodolfo García Peñas (kix)
75f979d45b repository/Gmail.py Unused argument
I removed this argument. The function is not used.
2020-08-30 14:17:10 +02:00
Rodolfo García Peñas (kix)
3aba335109 repository/Base.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 14:15:49 +02:00
Rodolfo García Peñas (kix)
ad0920de72 repository/Base.py Changed indentation
I joined the lines to avoid indentantion warning
2020-08-30 14:14:45 +02:00
Rodolfo García Peñas (kix)
2248a85f64 repository/__init__.py Removed unused variable
This variable is not used.
2020-08-30 14:13:27 +02:00
Rodolfo García Peñas (kix)
e496525b8b repository/__init__.py Removed extra chars
These parenthesis are not needed.
2020-08-30 14:12:35 +02:00
Rodolfo García Peñas (kix)
28470ae655 folder/UIDMaps.py Removed extra chars
These chars can be removed.
2020-08-30 14:10:53 +02:00
Rodolfo García Peñas (kix)
db1ee5b3e9 folder/UIDMaps.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 14:04:43 +02:00
Rodolfo García Peñas (kix)
4442a7ce67 folder/UIDMaps.py import fcntl
First, this file calls fcntl, but it has a typo.

Then, I import the fcntl library, as done in offlineimap/accounts.py
using portalocker first.
2020-08-30 14:01:51 +02:00
Rodolfo García Peñas (kix)
e4cb1a93be Removed unused variables
These variables are not used
2020-08-30 13:55:30 +02:00
Rodolfo García Peñas (kix)
8cbdc65ebf folder/UIDMaps.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:53:57 +02:00
Rodolfo García Peñas (kix)
c68e70519d folder/Maildir.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:51:34 +02:00
Rodolfo García Peñas (kix)
1bcd7d3d4d folder/Maildir.py Removed unused variables
These variables are not used.
2020-08-30 13:51:34 +02:00
Rodolfo García Peñas (kix)
91df77f69f folder/Maildir.py Updated docstrings 2020-08-30 13:51:29 +02:00
Rodolfo García Peñas (kix)
3d2692103f folder/Maildir.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:42:09 +02:00
Rodolfo García Peñas (kix)
28910df6c2 folder/Maildir.py removed extra chars
I removed some extra ()
2020-08-30 13:40:14 +02:00
Rodolfo García Peñas (kix)
a1f907696f folder/LocalStatusSQLite.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:37:28 +02:00
Rodolfo García Peñas (kix)
8742ff4311 folder/LocalStatusSQLite.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:36:40 +02:00
Rodolfo García Peñas (kix)
6059cf13ba folder/LocalStatusSQLite.py Removed extra chars
This patch removes the (). Are not needed.
2020-08-30 13:35:14 +02:00
Rodolfo García Peñas (kix)
5005de021d folder/LocalStatus.py split the if
This patch splits the if to avoid multiple commands in the same line.
2020-08-30 13:34:05 +02:00
Rodolfo García Peñas (kix)
b257cdca04 folder/LocalStatus.py Removed unused variables
These variables are not used.
2020-08-30 13:32:36 +02:00
Rodolfo García Peñas (kix)
dc8872377c folder/IMAP.py Removed unused variables
These variables are not used.
2020-08-30 13:30:39 +02:00
Rodolfo García Peñas (kix)
c3fe45ff2b folder/IMAP.py added docstrings arguments 2020-08-30 13:28:36 +02:00
Rodolfo García Peñas (kix)
88230bda47 folder/IMAP.py removed extra chars
This patch removes some backslash and (, )
2020-08-30 13:26:20 +02:00
Rodolfo García Peñas (kix)
9d93a6de8f folder/GmailMaildir.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 13:23:07 +02:00
Rodolfo García Peñas (kix)
4facfacc48 folder/Gmail.py changed not var in
This patch changes not var in with var not in
2020-08-30 13:20:17 +02:00
Rodolfo García Peñas (kix)
e3533e7fa9 folder/Gmail.py Removed extra backslash
This backslash could be removed.
2020-08-30 13:19:27 +02:00
Rodolfo García Peñas (kix)
6be58c297d folder/Gmail.py added docstrings
This patch adds the docstrings
2020-08-30 13:18:18 +02:00
Rodolfo García Peñas (kix)
2ff748ac0e folder/Base.py Added docstrings params
This patch only adds some docstrings params.
2020-08-30 13:05:32 +02:00
Rodolfo García Peñas (kix)
1fc10875a6 folder/Base.py changed not var in
This patch changes:

if not var1 in var2

with

if var1 not in var2
2020-08-30 12:42:28 +02:00
Rodolfo García Peñas (kix)
56299086e2 folder/Base.py Removed extra parenthesis
This patch removes these extra characteres.
2020-08-30 12:40:28 +02:00
Rodolfo García Peñas (kix)
1a529b6b0e offlineimap/ files singleton-comparison
This patch change these errors in the offlineimap folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:27:03 +02:00
Rodolfo García Peñas (kix)
da2baaaeb7 offlineimap/utils files singleton-comparison
This patch change these errors in the utils folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:18:18 +02:00
Rodolfo García Peñas (kix)
7b082f0fe9 offlineimap/folder files singleton-comparison
This patch change these errors in the 'folder' folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:15:00 +02:00
Rodolfo García Peñas (kix)
229aa59dba offlineimap/ui files singleton-comparison
This patch change these errors in the ui folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:07:59 +02:00
Rodolfo García Peñas (kix)
30afe4645e offlineimap/repository files singleton-comparison
This patch change these errors in the repository folder

C0121: Comparison to None should be 'expr is None' (singleton-comparison)
C0121: Comparison to None should be 'expr is not None' (singleton-comparison)
2020-08-30 11:03:57 +02:00
Rodolfo García Peñas (kix)
a186f65444 Maildir removed extra slash
This slash should be removed. I also join the lines.
2020-08-30 10:57:42 +02:00
Rodolfo García Peñas (kix)
c64275d27d bundled_imaplib2.py Do not make object inheritance
This patch removes these lintian warnings:

Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
2020-08-30 10:48:53 +02:00
Rodolfo García Peñas (kix)
3fafc3a46d Reformat offlineimap/bundled_imaplib2.py
Add/remove whitespaces, lines,...
2020-08-30 10:47:34 +02:00
Rodolfo García Peñas (kix)
e77440552c Do not make object inheritance
This patch removes these lintian warnings:

Warning R0205: Class 'X' inherits from object,
can be safely removed from bases in python3 (useless-object-inheritance)
2020-08-29 21:44:18 +02:00
Rodolfo García Peñas (kix)
ddfc2a766c Removed Py3 try except in mbnames.py
Same code in try and except.
2020-08-29 21:29:06 +02:00
Rodolfo García Peñas (kix)
bf08bb314d Removed not used imports
This patch removes the import lines not used
2020-08-29 21:20:31 +02:00
Rodolfo García Peñas (kix)
7d62441dc2 Changed import order
These changes close the lintian warning C0411.
2020-08-29 21:10:16 +02:00
Rodolfo García Peñas (kix)
b94983ee8a Removed extra line in offlineimap/folder/__init__.py
Removed extra line at EOF.
2020-08-29 20:41:27 +02:00
Rodolfo García Peñas (kix)
74ae944b06 Reformat offlineimap/threadutil.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:22:53 +02:00
Rodolfo García Peñas (kix)
973e3324ff Reformat offlineimap/mbnames.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:22:14 +02:00
Rodolfo García Peñas (kix)
9c865afbf0 Reformat offlineimap/localeval.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:21:45 +02:00
Rodolfo García Peñas (kix)
0e477ca9cc Reformat offlineimap/init.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:21:07 +02:00
Rodolfo García Peñas (kix)
2969f36663 Reformat offlineimap/imaputil.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:19:54 +02:00
Rodolfo García Peñas (kix)
b6a686e56f Reformat offlineimap/imapserver.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:19:23 +02:00
Rodolfo García Peñas (kix)
20a9837e26 Reformat offlineimap/imaplibutil.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:17:18 +02:00
Rodolfo García Peñas (kix)
ba9a3ce819 Reformat offlineimap/globals.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:16:35 +02:00
Rodolfo García Peñas (kix)
ceec91e0e6 Reformat offlineimap/error.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:15:55 +02:00
Rodolfo García Peñas (kix)
efcfd6b919 Reformat offlineimap/emailutil.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:15:20 +02:00
Rodolfo García Peñas (kix)
8b35dbabe1 Reformat offlineimap/CustomConfig.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:06:32 +02:00
Rodolfo García Peñas (kix)
9f15c05520 Reformat offlineimap/accounts.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:05:18 +02:00
Rodolfo García Peñas (kix)
58596767ef Reformat offlineimap/__init__.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:04:40 +02:00
Rodolfo García Peñas (kix)
c1d180543f Reformat offlineimap/utils/stacktrace.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:03:24 +02:00
Rodolfo García Peñas (kix)
5a81eccb49 Reformat offlineimap/utils/distro.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:01:52 +02:00
Rodolfo García Peñas (kix)
5d482a67ff Reformat offlineimap/utils/const.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 20:00:02 +02:00
Rodolfo García Peñas (kix)
ee236ec987 Reformat offlineimap/ui/UIBase.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:59:05 +02:00
Rodolfo García Peñas (kix)
6e0647de1a Reformat offlineimap/ui/TTY.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:58:32 +02:00
Rodolfo García Peñas (kix)
8bae38ed93 Reformat offlineimap/ui/noninteractive.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:57:49 +02:00
Rodolfo García Peñas (kix)
d31c5891ba Reformat offlineimap/ui/Machine.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:56:37 +02:00
Rodolfo García Peñas (kix)
9aa2344fd4 Reformat offlineimap/ui/debuglock.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:55:52 +02:00
Rodolfo García Peñas (kix)
1b385dfafb Reformat offlineimap/ui/Curses.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:55:07 +02:00
Rodolfo García Peñas (kix)
1df1a39b11 Reformat offlineimap/folder/Maildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:53:38 +02:00
Rodolfo García Peñas (kix)
8ed3d1ca9a Reformat offlineimap/folder/LocalStatus.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:52:56 +02:00
Rodolfo García Peñas (kix)
80ee751243 Reformat offlineimap/folder/IMAP.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:51:25 +02:00
Rodolfo García Peñas (kix)
3d1360a7e3 Reformat offlineimap/folder/GmailMaildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:50:46 +02:00
Rodolfo García Peñas (kix)
7be7a70d85 Reformat offlineimap/repository/Base.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:49:37 +02:00
Rodolfo García Peñas (kix)
b64430e035 Reformat offlineimap/repository/__init__.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:48:41 +02:00
Rodolfo García Peñas (kix)
3a1b25c204 Reformat offlineimap/folder/UIDMaps.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:48:04 +02:00
Rodolfo García Peñas (kix)
eafd9eb51d Reformat offlineimap/folder/Maildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:46:43 +02:00
Rodolfo García Peñas (kix)
265de25460 Reformat offlineimap/folder/LocalStatusSQLite.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:45:15 +02:00
Rodolfo García Peñas (kix)
cb95bc87b0 Reformat offlineimap/folder/LocalStatus.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:43:52 +02:00
Rodolfo García Peñas (kix)
da1788db53 Reformat offlineimap/folder/IMAP.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:43:09 +02:00
Rodolfo García Peñas (kix)
2f97dda6d9 Reformat offlineimap/folder/GmailMaildir.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:42:20 +02:00
Rodolfo García Peñas (kix)
af18230a2a Reformat offlineimap/folder/Gmail.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:41:19 +02:00
Rodolfo García Peñas (kix)
9ebdbe47ee Reformat offlineimap/folder/Base.py
Add some spaces, remove lines,... now format is better (lintian).
2020-08-29 19:39:31 +02:00
Rodolfo García Peñas (kix)
18d2e972ac Mail now is typle of bytes convert to str
This patch saves the tuple and discard the bytes/str (now bytes).

Then, convert the tuple elements to str (from bytes).
2020-08-29 19:00:28 +02:00
Rodolfo García Peñas (kix)
a88a9cf28e ui init is lintian clean
This patch only adds an space between the hash and the first character.
2020-08-29 09:51:31 +02:00
Rodolfo García Peñas (kix)
7ba9ca1cca Maildir set is a builtin in python3
set() is a builtin, it is already included.
2020-08-29 09:22:23 +02:00
Rodolfo García Peñas (kix)
99f85737c5 Removed python2 code in imaputil
This code is marked as python2, could be removed.
2020-08-29 09:07:15 +02:00
Rodolfo García Peñas (kix)
a655fa4fc2 threadutil imports not used
These imports are not used.
2020-08-29 09:04:07 +02:00
Rodolfo García Peñas (kix)
aebd530aaf threadutil imports without try except
Python 2 is not supported now. The import is the same in try and except.
2020-08-29 09:03:39 +02:00
Rodolfo García Peñas (kix)
ead8b157af CustonConfig imports withou try except
Python 2 is not supported now. The import is the same in try and except.
2020-08-29 09:02:16 +02:00
Rodolfo García Peñas (kix)
1618505d3b Machine imports withou try except
Python 2 is not supported now. The import is the same in try and except.
2020-08-29 09:00:30 +02:00
Rodolfo García Peñas (kix)
46c677151a UIBase imports without try except
Python 2 is not supported now. The import is the same in try and except.
2020-08-29 08:58:53 +02:00
Rodolfo García Peñas (kix)
3711954908 Folder name is already utf8
We don't need decode it.
2020-08-28 20:31:00 +02:00
Rodolfo García Peñas (kix)
36bfbdf7d6 Get the month number
This patch gets the month number using datetime library.

I removed the function Mon2num. The list is not used now, it is removed
too.

I need change the regex in the compile to get the fields. Now is str,
not binary, so I remored the 'b'.
2020-08-28 20:05:52 +02:00
Rodolfo García Peñas (kix)
e61e77cf40 Convert bytes to string in IMAP folder
Convert the IMAP reply to string.
2020-08-28 17:25:06 +02:00
Rodolfo García Peñas (kix)
1379c32c5a IMAP do not use single quotes on fetch
The IMAP command is:

C: A654 FETCH 2:4 (FLAGS BODY[HEADER.FIELDS (DATE FROM)])

not

C: A654 FETCH '2:4' (FLAGS BODY[HEADER.FIELDS (DATE FROM)])

The single quotes must be removed.
2020-08-28 17:18:29 +02:00
Rodolfo García Peñas (kix)
bb5b1f2dcf Encode folder name before md5
Avoid the error:

Unicode-objects must be encoded before hashing
2020-08-28 16:51:11 +02:00
Rodolfo García Peñas (kix)
22dfbd7a54 Split the IMAP folders
This patch modifies two files. First, we need split using '', not '""'.
Else we don't split anything.

OTOH, we need convert the bytes to string, then we can parse the folder
names.
2020-08-28 16:35:00 +02:00
Rodolfo García Peñas (kix)
c9a4b1fefa Add quotes in empty LIST calls
I need add this to get the imap LIST folders.
2020-08-28 16:03:15 +02:00
Rodolfo García Peñas (kix)
6fa099ff74 bundled_imaplib2 encode removed cr
This patch removes the cr in the encoding call. It avoids a crash.
2020-08-28 13:37:09 +02:00
Rodolfo García Peñas (kix)
6378c722b0 Do not use binary in the plain auth
Changed from binary to string in plain auth.
2020-08-28 13:06:31 +02:00
Rodolfo García Peñas (kix)
e84e932df4 Changed wrong comparison equal 2020-08-28 12:49:03 +02:00
Rodolfo García Peñas (kix)
5e356b0bf5 Removed codecs
I removed these calls to codecs because I got the error:

ValueError: can't have text and binary mode at once
2020-08-28 12:38:15 +02:00
Rodolfo García Peñas (kix)
476c485a52 Using standard imaplib2.py
This is the standard imaplib2 file.
2020-08-28 11:48:16 +02:00
Rodolfo García Peñas (kix)
75ce6e71f3 Comparison error 2020-08-28 03:33:49 +02:00
Rodolfo García Peñas (kix)
6ec6111896 2to3 main 2020-08-28 03:32:43 +02:00
Rodolfo García Peñas (kix)
0c58628c3b Remvoed Debug variable
I removed this variable.

The default level now is 3, not 5.
2020-08-28 02:59:37 +02:00
Rodolfo García Peñas (kix)
62209db06e Popen uses default buffer size
From the ipamlib2.
2020-08-28 02:28:35 +02:00
Rodolfo García Peñas (kix)
938bf647f1 Moving to imaplib2 python3 start
This patch only changes non-important parts, like imports,
comments, and more.
2020-08-27 22:53:16 +02:00
Rodolfo García Peñas (kix)
a6c5e96eb5 Force bundled_imaplib2
I am forcing to use the bundled. I will modify this library
to make it similar to imaplib2 for python3
2020-08-27 22:18:19 +02:00
Nicolas Sebrecht
ba4ecea9e4 v7.3.0
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-08-19 19:17:53 +02:00
Nicolas Sebrecht
9c6a1760b4 imaplib2 v2.101
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-06-18 23:50:29 +02:00
Ilias Tsitsimpis
beaaf77a1a Do not use TIMEOUT_MAX for Condition.wait()
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>
2019-06-18 23:16:04 +02:00
Julien Cristau
0a831b3cab Use SSLContext if available so we send SNI
Fixes https://github.com/imaplib2/imaplib2/issues/5

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-06-18 23:13:35 +02:00
Nicolas Sebrecht
741b33b455 imaplib2 v2.100
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-06-18 23:10:21 +02:00
Ben Cotterell
8d5b22bd09 Don't expect trailing space on command completion
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>
2019-06-18 23:04:26 +02:00
Olivier Mehani
0d5496ba0a implement Happy Eyeballs
This allows OfflineIMAP to not stall on malfunctional IPv6 connections,
and fall-back to a functional IPv4 connection, if faster, as described
in RFC6555.

Signed-off-by: Olivier Mehani <shtrom@ssji.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-06-10 14:36:53 +02:00
Nicolas Sebrecht
06ed00a211 v7.2.4
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-06-08 11:32:57 +02:00
Nicolas Sebrecht
801893cc73 make portalocker really optional
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-04-27 14:56:17 +02:00
kimim
2806f40071 use portable locker to support cygwin in Windows
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-04-27 14:37:44 +02:00
Nicolas Sebrecht
0d865c2e36 repository/IMAP: update copyright header date
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-02-27 08:48:59 +01:00
Kyle Altendorf
57a43f5bba mkdir -p alike folder creation
When creating a folder in one command on Gmail you end up with
one tag such as 'x/y/z' instead of three nested tags such as 'z'
inside of 'y' inside of 'x'.  Creating each layer individually
results in the desired nested label structure.

This was tested in a personal transfer of email from a remote
IMAP server to Gmail.

OfflineIMAP/offlineimap#335
OfflineIMAP/offlineimap#598

Signed-off-by: Kyle Altendorf <sda@fstab.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-02-27 08:45:57 +01:00
Nicolas Sebrecht
5c735fd327 v7.2.3
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2019-02-17 00:31:19 +01:00
Mart Lubbers
c9f71b0c64 add checks in curses ui for small windows
addch() and addstr() throw an exception if text has to be printed
outside of the window. This may occur if the terminal is very small.
Such erroneous prints are no-ops now.

Signed-off-by: Mart Lubbers <mart@martlubbers.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/595
2019-02-13 16:32:02 +01:00
Nicolas Sebrecht
137130fbd0 v7.2.2
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-12-22 18:46:34 +01:00
Robbie Harwood
096aa07650 Handle empty token with complete GSSAPI context
This fixes a potential traceback when we try to unwrap(None).

Tested-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-12-14 21:28:30 +01:00
Nicolas Sebrecht
a51064e83a maxage: always compute the remote cache list for min_uid
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/581
Tested-by: https://github.com/ianbrody
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-12-11 09:29:37 +01:00
Frode Aannevik
8692799e65 Fix expired oauth2_access_token
Use `expires_in` from the oauth2 response
to reset the oauth2_access_token before
it expires

divides the `expires_in` by 2 to ensure
the access_token is cleared before it
expires

ref: https://github.com/OfflineIMAP/offlineimap/issues/536

Signed-off-by: Frode Aannevik <frode.aa@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-11-18 21:07:54 +01:00
Philippe Loctaux
af3a35ae30 offlineimap/utilis/distro.py: identation fix
Fixed a indentation style.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-08-17 18:49:04 +02:00
Philippe Loctaux
761e10e8b1 Add Archlinux to list of supported distros
There is a bug with `platform.linux_distribution()`, which returns an
empty value on Archlinux with python2.

This bug is fixed in python3, but *will not* be fixed in python2.

This patch fixes that issue with a dirty hack: on archlinux, there is a
file that can be used to detect an archlinux machine. that file is
`/etc/arch-release`. if the file exists, then the OS variable will be
set to "linux-arch".

You can learn more about that issue on the python bug platform:
https://bugs.python.org/issue20454

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-08-17 18:49:04 +02:00
Nicolas Sebrecht
d9301254ff fix dates in copyright lines
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-08-13 01:15:01 +02:00
Philippe Loctaux
2890dec37f Added ssl certfile on osx for openssl pacakge on homebrew
A certfile was already specified for osx but only with MacPorts,
this patch adds the certfile given with the package `openssl` with
homebrew.

You can get more info with the command `brew info openssl` on osx with
homebrew and openssl installed.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-08-10 12:48:17 +02:00
Philippe Loctaux
7af4728d62 Add Archlinux to list of supported distros
get_os_name returns linux-arch on Archlinux, so add a line for linux-arch to __DEF_OS_LOCATIONS.

Signed-off-by: Philippe Loctaux <loctauxphilippe@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-08-10 12:42:29 +02:00
Benedikt Heine
ce9a1981c1 Chain tls_level and ssl_version only if ssl is enabled
If the tls_level is set to a cipherset other than tls_compat, the
ssl cipherset has to get specified extra, if ssl is used.

But if the user explicitly disabled SSL, and set tls_level to anything
else than tls_compat required the user to explicitly set ssl_version,
which is contradicting.

Signed-off-by: Benedikt Heine <bebe@bebehei.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-07-02 18:44:08 +02:00
Benedikt Heine
d3ba837900 Fix typo in exception message
Signed-off-by: Benedikt Heine <bebe@bebehei.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-07-02 18:44:08 +02:00
Carnë Draug
c9005cd4ff Check if username is provided before trying plain authentication.
If the username value is not provided on the configuration file, then
username if of NoneType and NULL.join will bomb since Nones can't be
joined with strings.  So check if username is empty and raise an
exception if so.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/558
Signed-off-by: David Miguel Susano Pinto <carandraug+dev@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-06-16 15:17:35 +02:00
Carnë Draug
5f9474e10d Print username instead of accountname when asking for password
When asking for a password interactively, the username is never
displayed which may hide problems (typos on the configuration, or
issues on offlineimap parsing of the config file).  The hostname,
port, and account name are already displayed when establishing the
connection.  When asking for password, the account name is displayed
again.  Change it to display the username.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/558
Signed-off-by: David Miguel Susano Pinto <carandraug+dev@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-06-16 15:17:35 +02:00
Nicolas Sebrecht
11313a9b9c v7.2.1
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-06-16 15:08:07 +02:00
Nicolas Sebrecht
b5ffa1c163 imapserver: fix copyright line
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-06-07 18:39:08 +02:00
Robbie Harwood
17cfb63db6 Pass username through in GSSAPI connections
Fix bug in GSSAPI auth where the username was not being negotiated.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/541
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Tested-by: Frank Lenormand <lenormf@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-06-07 18:36:58 +02:00
Nicolas Sebrecht
fc61c6fd30 Gmail: allow parenthesis in labels
Reported-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com>
Tested-by Heinrich Hartmann <Heinrich@HeinrichHartmann.com>
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/545
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-18 02:10:56 +02:00
Nicolas Sebrecht
356bd0b78f Merge branch 'fingerprint-colons' into next
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-15 00:41:22 +02:00
velleto
c126b4286d Allow users to keep colons between each hex pair of server certificate fingerprint in configuration file.
Signed-off-by: velleto <rr@velleto.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-15 00:39:59 +02:00
velleto
b150daaa49 Added support for sha512, sha384, sha256, sha224 hashing algorithms to calculate server certificate fingerprints.
Signed-off-by: velleto <rr@velleto.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-15 00:38:06 +02:00
velleto
5180b964d8 Removed uneccessary call of list() on zip() object.
Signed-off-by: velleto <rr@velleto.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-15 00:38:06 +02:00
velleto
ac9ed47262 Changed the 'exception raised' message, to be more understandable.
Signed-off-by: velleto <rr@velleto.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-15 00:38:06 +02:00
Edgar HIPP
89b40ec3af Make CTRL-C message more clear
Signed-off-by: Edgar Hipp <ehipp@hotmail.fr>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-05-01 16:21:57 +02:00
Eygene Ryabinkin
3a807d0f2b Create filenames with no path separators in them
We use current hostname as the element of the unique file name.
Sometimes there is non-/24 zone delegation,
{{{
$ host 144.206.233.65
65.233.206.144.in-addr.arpa is an alias for 65.26/64.233.206.144.in-addr.arpa.
}}}
as per RFC 2317,
  https://www.rfc-editor.org/rfc/rfc2317.txt

So on Un*x systems we may run into having path separator inside
the file name.  Not good, things will choke.  Prevented this
by substituting all appeared path separators in the return value.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
Tested-at: my MacOSX instance, my FreeBSD instances
2018-04-09 20:09:56 +03:00
Nicolas Sebrecht
a6de848a23 v7.2.0
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tested-by: Remi Locherer <remi.locherer@relo.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-04-07 20:17:52 +02:00
Robbie Harwood
88724949fa Port to python-gssapi from pykerberos
python-gssapi has a visible, active upstream and a more pleasant
interface.  python-gssapi is present in most distributions, while
pykerberos is slated for removal from Fedora/RHEL/CentOS.

Github-ref: https://github.com/OfflineIMAP/offlineimap/pull/529
Tested-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-03-02 16:24:36 +01:00
Musashi69
c8847ccff9 make UI output show local AND remote dirs involved
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/525
Signed-off-by: Friedemann Schorer friedemann@schorers.org
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-02-24 01:13:40 +01:00
Nicolas Sebrecht
67d35dbbcb v7.1.5
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tested-by: Remi Locherer <remi.locherer@relo.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2018-01-13 13:55:23 +01:00
Nicolas Sebrecht
0d6a9a44da maxage: don't consider negative UIDs when computing min UID
With new emails we could have negative UIDs in come use cases. Exclude these
from the list of UIDs. The negative UIDs lead to invalid SEARCH command:

 SEARCH command error: BAD ['Could not parse command']. Data: FMAO19 SEARCH (UID -4:*)

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/512
Tested-by: https://github.com/shubhamkrm
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-12-22 22:01:00 +01:00
Nicolas Sebrecht
e802f5fbd5 folder: IMAP: improve search logging
Log when exception occured during search command, too.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/512
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-12-22 15:13:51 +01:00
John Ferlito
3c6b07b25f Add missing space to output string
It was previously printing "Upgrading LocalStatus cache from version 1to version 2 for XXX"

Signed-off-by: John Ferlito <johnf@inodes.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-11-26 18:05:10 +01:00
Nicolas Sebrecht
9805d3e7af no UIDPLUS: improve logging on failures
When there is not UIDPLUS we have to figure the UID by our means. When this
process fails, we don't know if the email was successfully uploaded. This patch
provides better logs to explain what happened.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-11-12 22:40:06 +01:00
Nicolas Sebrecht
681e271fc0 v7.1.4
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-29 15:23:29 +01:00
Nicolas Sebrecht
5836970d51 utf8foldernames: fix missing decode argument
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/502
Tested-by: https://github.com/pprw
Reviewed-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-29 00:45:32 +02:00
Nicolas Sebrecht
a79263bb31 utf8foldernames: support --delete-folder with UTF-8 folder name
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/505
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-29 00:44:39 +02:00
Thomas Merkel
ee17e3dc3c Fix: if any tunnel (preauth_tunnel or transport_tunnel) the hostname should not be required
It's required to modify my change 1ce596d713
because a hostname shouldn't be needed if any tunnel is used. Both tunnels
provide a regular IMAP interface which is used by offlineimap.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/503
Reported-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Thomas Merkel <tm@core.io>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-27 20:03:17 +02:00
Nicolas Sebrecht
e1a6feb2d5 v7.1.3
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tested-by: Remi Locherer <remi.locherer@relo.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-08 15:58:10 +02:00
Nicolas Sebrecht
6b64f87462 provide non-zero exit code & display configuration mismatch error at the end of the run
This behaviour is what users would expected most. The error message is about
utf8foldernames and decodefoldernames.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:24:12 +02:00
Nicolas Sebrecht
12de158ca2 Merge branch 'uliska/utf8foldernames' into next 2017-10-02 21:11:29 +02:00
Urs Liska
8b398f3aa8 utf8: Safeguard against use of old *and* new option
The new 'utf8foldernames' will not work together with the existing
'decodefoldernames' option (which will be documented in the next
commit). Therefore this commit will check for this condition and
abort the synchronization of a misconfigured account before doing
any changes.
Other accounts are not affected.

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
ef3299b7ce Remove some unnecessary whitespace (in existing code)
Addresses https://github.com/OfflineIMAP/offlineimap/pull/498#discussion_r141672756

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
36d726763d utf8: implement utf8foldernames option
If utf8foldernames is enabled on account level all folder names read
from the IMAP server will immediately be reencoded to UTF-8. Names
will be treated as UTF-8 as long as the IMAP server isn't contacted again,
for which they are reencoded to IMAP4-UTF-7.

This means that any further processing such as nametrans, folderfilter
etc. will act upon the UTF-8 names, which will have to be documented
carefully.

NOTE 1:
GMail repositories and folders inherit from the IMAP... classes, so I don't
know yet if these changes have ugly side-effects. But web research suggests
that GMail IMAP folders are equally encoded in UTF-7 so that should work
identically here and incorporate the same improvements.

NOTE 2:
I could not test the behaviour with idlefolders as I didn't get this option
to work at all, not even with the latest stable version.

NOTE 3:
I *did* test to sync an IMAP repository against another IMAP repository.

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
14d83dbf48 utf8: avoid dequoting IMAP folder names twice
Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
dca5f1846d utf8 (aside): Move code for decodefoldernames
While intending *not* to change the behaviour of the existing
decodefoldernames option this commit transparently improves
the coding.
So far this worked by overriding the folder's getvisiblename() method
which reads self.visiblename from and applies the conversion on
*every* invocation of getvisiblename().
This commit does the calculation once in the IMAPFolder's __init__.

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
24b3f27e5f utf8: Add utf-7/8 conversion functions
This commit adds two functions
- imaputil.IMAP_utf8()
- imaputil.utf8_IMAP()
as an interface to the new imap4_utf_7 codec.

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Urs Liska
032376efad utf8: Add imap4_utf_7 codec
Add code to reencode IMAP folder names to regular utf-8.
This starts an implementation that will add a new config option
`utf8foldernames` on account level which will fix #299 and on the
long run replace the current `decodefoldernames` option.

This commit introduces code to register an `imap4_utf_7` codec
on which two-way conversion methods will later be built.

Original code by
(https://www.blogger.com/profile/16648963337079496096),
taken from
http://piao-tech.blogspot.no/2010/03/get-offlineimap-working-with-non-ascii.html

In the comment
http://piao-tech.blogspot.com/2010/03/get-offlineimap-working-with-non-ascii.html?showComment=1316041409339#c669880170006851138
indicates that this code is expected to be incorporated into offlineIMAP and therefore the author implicitly agrees to put it under this license.

Signed-off-by: Urs Liska <git@ursliska.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 21:09:43 +02:00
Nicolas Sebrecht
31eee55672 accounts: error out when no folder to sync
Such error can be hit when the folderfilter is wrong and excludes all the
folders.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-10-02 02:43:47 +02:00
Thomas Merkel
1ce596d713 remotehost should not be required if transporttunnel is used
If the config option `transporttunnel` is used the option `remotehost` is not
needed, because the tunnel provide the IMAP connection.

Signed-off-by: Thomas Merkel <tm@core.io>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-09-21 18:50:57 +02:00
Nicolas Sebrecht
19442d0010 folder: Gmail: fix copyright header
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-08-15 01:24:23 +02:00
Nicolas Sebrecht
a5d9edc560 folder: Gmail: remove dead code
The support for the realdelete configuration option was removed because this
could lead to data loss.

See 51728ed to know more.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-08-15 01:19:56 +02:00
Nicolas Sebrecht
6079755b20 sqlite: provide better message error for insert
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/488
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-07-25 11:28:56 +02:00
Nicolas Sebrecht
e4bee74dad v7.1.2
Tested-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
Tested-by: benutzer193 <registerbn@gmail.com>
Tested-by: Remi Locherer <remi.locherer@relo.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-07-10 16:58:50 +02:00
Nicolas Sebrecht
0903d5f33c increase imaplib2 requirement from v2.55 to v2.57
Suggested-by: Chris Coleman <christocoleman@yahoo.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-07-09 17:28:12 +02:00
Nicolas Sebrecht
212ed87509 imapserver: fix syntax error
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-06-30 16:42:47 +02:00
Nicolas Sebrecht
90244b7fa6 provide more details in error message when SSL fails on non-standard port
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-06-30 05:10:14 +02:00
Nicolas Sebrecht
ba47138616 folder/IMAP: introduce dedicated parsing for davmail (not supporting UIDPLUS)
Some returned responses end with ')' rather than 'UID XXX)' as expected.

BTW, a better policy could be to request for the 'X-OfflineIMAP' header only
rather than fetching all the headers and looking for it manually.

Also:
- Strip the output when error occurs: we don't need the full response unless
  'imap' debug mode is enabled.
- Improve the comments.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/479
Tested-by: https://github.com/secomi
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-06-27 20:32:58 +02:00
Nicolas Sebrecht
ce83efc3c7 folder/IMAP: improve the warning when we can't parse the returned UID
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/479
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-06-14 09:47:51 +02:00
Nicolas Sebrecht
05ff68c7e1 IMAP/IMAP: continue to sync if the local side does not return a valid UID on upload
There's no reason we should abort the full sync.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/479
Tested-by: https://github.com/secomi
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-06-14 09:12:15 +02:00
Nicolas Sebrecht
6b51d4ed49 v7.1.1
Tested-by: Remi Locherer <remi.locherer@relo.ch>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-05-28 18:08:54 +02:00
Nicolas Sebrecht
f37b97c61b maxage: use the remote folder first to compute min_uid
On each folder scan, we must compute the min_uid. Locally, this is done by
relying on the prefix timestamp in the filenames. If for whatever reason they do
not reflect the Date header of the email, changing maxage leads to undefined
behaviour.

To prevent from this, we rather rely on the remote folder. We assume that the
remotes are more reliable to provide correct sets of UIDs based on dates than we
are.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/384
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-05-21 00:50:04 +02:00
Nicolas Sebrecht
5d5ad62fa7 mbnames: don't duplicate entries in autorefresh mode
mbnames is initialized and written once in the run from OfflineImap.__sync().

However, the in-memory instance is fed with data at sync time for each folder
and the intermediate files are written as soon as all the folders are synced for
the account. All of this is done inside the SyncableAccount.__sync() method
while the syncrunner is looping on this.

This means that we duplicate entries for mbnames in each loop (most likely when
autorefresh is enabled).

It is wrong to have duplicates in mbnames for each account. Ignore duplicates
when adding data in the mbnames intermediate files.

Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/467
Reported-and-tested-by: Shin Kojima <shin@kojima.org>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-05-19 08:32:22 +02:00
Nicolas Sebrecht
ffeefd9459 env info (used by -V and banner): add openssl version
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-05-02 17:09:03 +02:00
Nicolas Sebrecht
22a163a768 display the imaplib and python versions for each normal run
Some users might use more than one python/imaplib version. This tends to make
debugging and support harder.

Displaying this information by default for each run should help.

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-30 13:25:40 +02:00
Nicolas Sebrecht
8c04684f3b imapserver: provide some SSL info while in imap debug mode
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/457
Tested-by: Maximilian Kaul <https://github.com/maximiliankaul>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2017-04-30 12:15:08 +02:00