Commit Graph

2755 Commits

Author SHA1 Message Date
Nicolas Sebrecht
50a3ee53bf requirements.txt: update imaplib2 version requirement
Fixes #39

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2021-08-03 00:41:22 +02:00
Rodolfo García Peñas (kix)
87f9507cc9
Merge pull request #75 from thekix/master
Windows patches
2021-07-25 15:58:28 +02:00
Rodolfo García Peñas (kix)
1a0c29a00e OS rename raises an exception on Windows
This patch checks the exception raises by os.rename()
on Windows and provide the same behavior than Linux.

This patch is related to issue #37, issue 5.
This patch sets closes the issue 37.
closes #37
2021-07-25 15:53:09 +02:00
Rodolfo García Peñas (kix)
c305f47e84 OSError does not include __getitem__
This patch removes the issue about using [] with
OSError instances. This es an old method from Python2.

This patch is related to issue #37, issue 4.
2021-07-25 15:53:09 +02:00
Rodolfo García Peñas (kix)
33f3b4b1aa Do not use UNIX signals in Windows
This patch does not use the signals in Windows. just avoid these calls.

This patch is related to issue #37, issue 3.
2021-07-25 15:53:09 +02:00
Rodolfo García Peñas (kix)
09fc0ece61 imaplib2 version function
The new imaplib2 version >= 3.06 includes a function "version()",
and this patch uses the old style __version__ value and the new
function.

This patch is related to issue #37, issue 2.
2021-07-25 15:53:09 +02:00
Rodolfo García Peñas (kix)
a6fd6b1ded Include portalocker in imaplibutil.py
This patch include the usage of portalocker for Windows environments,
because fcntl is not available.

This patch is related to issue #37, issue 1.
2021-07-25 15:50:47 +02:00
Rodolfo García Peñas (kix)
be752838c8
Merge pull request #73 from piyueh/update-doc
update README
2021-06-12 16:11:31 +02:00
Pi-Yueh Chuang
199b8257eb
update README
- moved hyperlinks to the same section
- removed redundant and incorectly-formated Markdown hyperlink
- added the information of offlineimap 3 Arch Linux AUR package
- removed info of installing imaplib2 from its github repo: imaplib2 now
  has a release on PyPI.
2021-06-10 18:16:53 -04:00
Rodolfo García Peñas (kix)
fe443e6bd3
Merge pull request #72 from jishac/encoding_edge_cases
Encoding: edge cases and error handling
2021-06-09 06:03:54 +02:00
Rodolfo García Peñas (kix)
1bb43856fa
Merge pull request #70 from xianwenchen/master
README.md: two improvements
2021-06-09 06:00:37 +02:00
Joseph Ishac
9e0fb59bdf Adding missing import of NoBoundaryInMultipartDefect 2021-06-07 22:18:31 -04:00
Joseph Ishac
5b976fc5da Making error handling when parsing messages consistent 2021-06-07 21:57:54 -04:00
Joseph Ishac
9bebcbe4f7 Adding utilities to Base class.
Moving the quoted boundary fix to the Base class so that it can be used
by any subclass that needs to read an email.  Adding another utility to
extract message-id from a raw email.
2021-06-07 20:26:26 -04:00
Joseph Ishac
b4f100c92c Merge branch to add extra debugging to imap parsing into encoding_edge_cases branch 2021-06-07 14:07:43 -04:00
Joseph Ishac
b0aad911ab Adding some extra error handling when parsing from imaplib 2021-06-07 14:05:07 -04:00
Xianwen Chen
4585ffb6dc README.md:
Previously, the link to releases was pointing to offlineimap. I now point the link to the offlineimap3's releases.
  I added a note explaining how one may install imaplib2 from git repository. This is related to issue #69.
2021-05-10 14:44:27 +00:00
Rodolfo García Peñas (kix)
721d579a32
Merge pull request #66 from duritong/fix-fingerprint-verification
disable verification of ssl certs via CA if fingerpint is set
2021-05-09 11:28:17 +02:00
Rodolfo García Peñas (kix)
f6848015ff
Merge pull request #55 from sudipm-mukherjee/gmail
BUG: Gmail FETCH error with synclabels enabled
2021-05-09 11:24:03 +02:00
Rodolfo García Peñas (kix)
edef557bf3
Merge pull request #54 from sudipm-mukherjee/curses
BUG: Right format for password from Curses
2021-05-09 11:23:24 +02:00
Rodolfo García Peñas (kix)
c8af778e53
Merge pull request #59 from pmocek/patch-2
Reference secure/HTTPS pages in README
2021-05-09 11:21:51 +02:00
Rodolfo García Peñas (kix)
b1f607943d
Merge branch 'master' into patch-2 2021-05-09 11:21:39 +02:00
Rodolfo García Peñas (kix)
663f8f0630
Merge pull request #60 from pmocek/patch-1
Fix broken links in README
2021-05-09 11:18:59 +02:00
Rodolfo García Peñas (kix)
0b6321c28e
Merge pull request #64 from paniash/master
Fix hyperlink in README
2021-05-09 11:18:36 +02:00
mh
871b1175f1 disable verification of ssl certs via CA if fingerpint is set
Up to a4863b2 offlineimap did not include a default CA bundle. And
folks who set cert_fingerprint (because they might connect to a
host using a self-signed cert or an onion service without the onion
address in the SANs) were able to validate their certificates.

Since a4863b2 you always have a `sslcacertfile` configured (since
it always falls back to the os one) and thus the old way didn't
work anymore.

If a use defines a `cert_fingerprint` there is not much use to
validate the cert through the CA chain, since the fingerprint
is the stronges verification you can get. Therefor we can disable
verfication when `cert_fingerprint` is set.

This enables users to fetch emails again from onion services or
hosts using self-signed certifcates, but doesn't question nor
change any other behavior.

Fixes #41
2021-04-29 14:34:06 +02:00
Ashish Panigrahi
a8891d2a73
Fix hyperlink in README 2021-04-22 14:44:01 +05:30
Joseph Ishac
84b96e1daa Adding re.DOTALL to catch potentially folded lines and fixed formatting 2021-04-14 17:08:16 -04:00
Joseph Ishac
a4532294ae Correcting an issue where dbg_output was not defined when the server was
unreachable due to an optimization in PR#56.  Since message-id is more
useful to better pin point the correct message, removing dbg_output.

Also fixing https://github.com/OfflineIMAP/offlineimap3/issues/62 by
correcting broken multipart boundaries or raising an error if as_bytes()
fails.  Related python bug submitted: https://bugs.python.org/issue43818
although this workaround should be sufficent in the interim.

Signed-off-by: Joseph Ishac <jishac@nasa.gov>
2021-04-14 14:54:25 -04:00
Joseph Ishac
f024bb9e4c Wrap bytes check in a wrapper to be a bit more efficient 2021-04-14 11:19:22 -04:00
Joseph Ishac
0345390aa1 Fixed oversight in regular expression (boundary cannot be empty) 2021-04-14 11:14:44 -04:00
Joseph Ishac
b78af75064 Adding a handler to detect the unlikely edge case where a message may
have an improperly quoted boundary that can cause the python library to
fail to reproduce the original message with msg.as_bytes().  See:
https://bugs.python.org/issue43818 and
https://github.com/OfflineIMAP/offlineimap3/issues/62
2021-04-13 00:01:26 -04:00
Joseph Ishac
6a45eef3b5 Fixed a minor bug discovered if server is unreachable when debugging 2021-04-12 22:58:58 -04:00
Phil Mocek
cf6ea4dd2d
Reference secure/HTTPS pages in README
Use TLS-enabled URIs (s/http:/https:/)
2021-03-12 13:37:38 -08:00
Phil Mocek
d37eb870d4
Fix broken links in README
Add URL for "offlineimap3" links
2021-03-12 13:33:34 -08:00
Rodolfo García Peñas (kix)
1e7ef9e7e6
Merge pull request #56 from jishac/multiple_encoding_support
Multiple encoding support
2021-02-25 03:22:51 +01:00
Joseph Ishac
bacb690126 Merge branch 'multiple_encoding_support' of github.com:jishac/offlineimap3 into multiple_encoding_support 2021-02-23 20:19:27 -05:00
Joseph Ishac
7e7349d8ed Final Testing of IMAP and MailDir complete. GMAIL should be patched as well and I reviewed the code several times. However, I cannot test it, testers wanted!
This commit: Minor bug fixes from testing

Should finalize implementation of enhancement #48
https://github.com/OfflineIMAP/offlineimap3/issues/48

And fix issues #43 and #44
https://github.com/OfflineIMAP/offlineimap3/issues/43
https://github.com/OfflineIMAP/offlineimap3/issues/44

Signed-off-by: Joseph Ishac <jishac@nasa.gov>
Tested-by: Joseph Ishac <jishac@nasa.gov>
2021-02-23 20:12:55 -05:00
Joseph Ishac
8df3fa1b5f Fixed overlooked variable when debugging is on.
Should finalize implementation of enhancement #48
https://github.com/OfflineIMAP/offlineimap3/issues/48

And fix issues #43 and #44
https://github.com/OfflineIMAP/offlineimap3/issues/43
https://github.com/OfflineIMAP/offlineimap3/issues/44
2021-02-23 20:00:01 -05:00
Joseph Ishac
259bf83607 Fixing up the rest of the parsing and IMAP functions, and GMAIL classes as well. Also adding is_debugging() to the UI to allow us to quickly determine if we should build some of the expensive debug objects 2021-02-23 16:17:54 -05:00
Joseph Ishac
5fc08e529b BUG: behavior of fetch now only returns a single entry, the use of
data[0][0] here is a carry over from the old behavior of offlineimap
(python2)
2021-02-22 23:27:45 -05:00
Joseph Ishac
3166723baa Removing obsolete emailutil.py. The date functionality was pulled into folder/Base.py which now handles messages as binary objects 2021-02-21 23:20:39 -05:00
Joseph Ishac
14b318b0e2 Formatting and adding the requirements that were removed as part of the "Included charset detection" patch that was reverted. Added all but chardet~=3.0.4 which is not needed with this fix. 2021-02-21 23:09:33 -05:00
Joseph Ishac
f71ef226bf Merge branch 'master' into multiple_encoding_support. Dropping patch
for "Included charset detection"
2021-02-21 22:36:30 -05:00
Joseph Ishac
c8b275cdc3 Revert "Included charset detection"
This reverts commit 62490ff183.
2021-02-21 22:31:49 -05:00
Sudip Mukherjee
8b88441759 BUG: Gmail FETCH error with synclabels enabled
If synclabels is enabled then offlineimap is sending '1:*' to imaplib2,
and imaplib2 while creating the FETCH command is quoting the sequence
and the command becomes:
b"JFFJ10 FETCH '1:*' (FLAGS X-GM-LABELS UID)\r\n"

Remove the single-quotes to prevent that and also consider the response
as bytes.

Closes: #52

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
2021-02-20 00:34:01 +00:00
Sudip Mukherjee
3afd3395bd BUG: Exception with debug logs
When ui is set to 'Curses Blinkenlights' and debug logs are enabled,
we get an exception with 'embedded null character'.

Remove the NULL from the log, keeping the log message same as before.

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
2021-02-20 00:20:36 +00:00
Sudip Mukherjee
c11232cf53 BUG: Right format for password from Curses
Reading the password from Curses Blinkenlights returns a bytes objects
instead an utf-8 string.

This patch will decode if bytes is provided.

Closes: #49

Signed-off-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
2021-02-20 00:20:36 +00:00
Joseph Ishac
49b6c30ace Cleaning up some more use of the old message string "content" to use "msg" email object instead. 2021-02-19 17:00:15 -05:00
Rodolfo García Peñas (kix)
9e8e30794c
Merge pull request #53 from thekix/master
Included charset detection
2021-02-19 16:43:02 +01:00
Rodolfo García Peñas (kix)
62490ff183 Included charset detection
This patch includes charset detection to read the message.

This patch is related to issue #43

Signed-off-by: Rodolfo García Peñas (kix) <kix@kix.es>
2021-02-19 16:39:17 +01:00