Commit Graph

136 Commits

Author SHA1 Message Date
Martin Rusev
cb2cde3caa Merge pull request #69 from Intevation/master
Check SSL-Context for IMAP4_SSL connections
2016-06-07 23:29:02 +02:00
Bernhard Herzog
ad085d9b82 Allow the user to supply a custom ssl context
The new ImapTransport parameter ssl_context replaces the usesslcontext
parameter and allows the user to supply their own ssl context object. If
ssl_context is not given, but ssl is true, python's default ssl context
is used. That default context is the one that actually does some
certificate checks, such as whether the hostname matches the names given
in the server's certificate and not the default context used by
IMAP4_SSL when instantiated with ssl_context=None which does not
certificate checks at all.

The Imbox class is extended with the same ssl_context parameter which is
simply passed through to ImapTransport.

This commit together with the previous commits from Dustin Demuth
changes Imbox in a slightly incompatible way: SSL-Certificates are now
checked by default whereas before they were not checked at all. This
improves security substantially but users need to be aware that working
programs might start raising exceptions due to failing certificate
checks.
2016-06-02 12:52:04 +02:00
Bernhard Herzog
adfbc2f3f2 Fix IMAP transport instantiation
This reverts the approach to IMAP transport instantiation back to how it
was done prior to 2a0117b6 which introduced the usesslcontext parameter.
This reduces code duplication and importantly make instantiation work
again because self.IMAP4 and self.IMAP4_SSL do not exist.
2016-06-02 12:51:42 +02:00
Dustin Demuth
61ca73e0e0 Fixed a condition 2016-06-02 11:15:51 +02:00
Dustin Demuth
2a0117b67f According to https://github.com/martinrusev/imbox/issues/68 the
software was altered, in order to use the systems SSL-Context as
default.

It allows to toggle the use of the SSL-Default Context. It does not
allow to use a custom context.

 Considerations:
 * If No SSL-Validation should be done, the ImboxClass should be adapted, in
   order to achieve configuration of the ssl-context. This commit does not
   contain this alteration.

 Other Changes:
 * Reformatted long lines
2016-06-02 11:00:39 +02:00
martinrusev
9dd4913ede Update on pypi 2016-04-08 12:18:17 +02:00
Martin Rusev
d6501af4ae Merge pull request #67 from oleglite/master
Fix UnicodeDecodeError when parsing headers with python 3
2016-03-27 17:41:20 +02:00
Oleg Beloglazov
9214dcf2a2 Fix UnicodeDecodeError when parsing headers with python 3 2016-03-27 17:40:52 +03:00
Martin Rusev
58f0febbf0 Merge pull request #66 from Method-B-Ltd/master
Make sure that a part is actually text before we try to decode it.
2016-03-26 19:28:00 +01:00
Michael Mulqueen
585c294b2c Make sure that a part is actually text before we try to decode it. 2016-03-26 17:16:04 +00:00
Martin Rusev
48cdd8318e Merge pull request #65 from sethbrin/master
fix bug in the logger of decode_mail_header
2016-02-27 18:24:18 +02:00
sethbrin
2dee895954 fix bug in the logger of decode_mail_header 2016-02-27 20:21:36 +08:00
Martin Rusev
438f8ea4b8 Merge pull request #63 from mmulqueen/master
Attachments cannot be multipart messages, so check this.
2016-02-12 21:07:28 +02:00
Michael Mulqueen
26fe1c9781 Attachments cannot be multipart messages, so check this. 2016-02-12 13:08:27 +00:00
Martin Rusev
8972988663 Merge pull request #62 from ErwinJunge/master
More unicode fixes
2016-02-03 21:07:54 +02:00
Erwin Junge
f1d08efaa3 More unicode fixes 2016-02-03 16:43:20 +01:00
martinrusev
418ffb8439 Update version and push to pypi 2015-12-12 12:14:42 +02:00
Martin Rusev
67d4fe0e9e Merge pull request #59 from ErwinJunge/master
Fix unicode support
2015-10-29 22:16:48 +02:00
Erwin Junge
662e458c1d Fix unicode support 2015-10-29 20:08:44 +01:00
Martin Rusev
cb9f99c1fe Update .travis.yml 2015-10-22 09:07:52 +03:00
Martin Rusev
4aa7648736 Merge pull request #58 from hombit/patch-2
Bugfix for python 3
2015-10-22 09:05:43 +03:00
Konstantin Malanchev
2e9d47223f Bugfix for python 3
Fix big from issue #52:
https://github.com/martinrusev/imbox/issues/52
2015-10-21 20:13:31 +03:00
Martin Rusev
5e11aa55e4 Merge pull request #57 from ErwinJunge/master
Improve image support
2015-10-20 22:47:41 +03:00
Erwin Junge
d53f1d0d23 Add support for getting filename from content-type 2015-10-20 13:00:10 +02:00
Erwin Junge
440d73ffe7 Add support for 'image' type 2015-10-20 12:45:28 +02:00
Martin Rusev
603ff7daf9 Merge pull request #53 from wkiser/master
Adding port parameter to Imbox
2015-07-15 22:07:53 +03:00
Warren Kiser
a2ca2ae6ab Adding port parameter to Imbox 2015-07-15 14:54:11 -04:00
Martin Rusev
37a3e124dc Merge pull request #51 from eliangcs/master
Fix some errors appeared on Python 3.4
2015-06-23 13:12:27 +03:00
Chang-Hung Liang
1eadc47221 Fix Python 3.4 errors 2015-06-23 16:35:50 +08:00
Martin Rusev
02f94a8e23 Merge pull request #49 from graingerkid/master
Logging throwing encoding error.
2015-06-16 17:46:58 +03:00
graingerkid
6cedd89711 Merge pull request #1 from graingerkid/graingerkid-patch-1
Update parser.py
2015-06-16 15:10:48 +01:00
graingerkid
be3bdd3f5f Update parser.py 2015-06-16 15:09:53 +01:00
Martin Rusev
01463c7ba0 Merge pull request #48 from NotANormalNerd/master
Add logging to imbox
2015-06-13 15:16:14 +03:00
Dennis Schmalacker
ccc4743c15 Add logging to imbox 2015-06-12 22:42:15 +02:00
Martin Rusev
a7d0cf4ac6 Merge pull request #46 from d1ffuz0r/cc_bcc_support
cc + bcc fields extraction
2015-05-27 13:23:14 +03:00
Roman Gladkov
65dfe753a2 cc + bcc extraction 2015-05-26 16:48:06 -07:00
Martin Rusev
3c4d59cba8 Update README.md 2015-04-23 15:51:34 +03:00
Martin Rusev
4a2cfa7f04 Update version and push to pypi 2015-04-23 15:45:13 +03:00
Martin Rusev
bbe29caf89 Merge pull request #44 from eliangcs/master
Add support for searching subject
2015-04-08 10:07:06 +03:00
Chang-Hung Liang
fded6c2f39 Add support for searching subject 2015-04-08 13:54:06 +08:00
Martin Rusev
fe0cc0b0a5 Merge pull request #43 from ookami-kb/master
excluded attachments from charset decoding; fixed regex in decode_param
2015-02-04 07:17:38 +02:00
ookami.kb
03ffe55255 excluded attachments from charset decoding; fixed regex in decode_param 2015-02-04 00:57:22 +01:00
Martin Rusev
c815f824df Merge pull request #42 from ookami-kb/master
fixed charset problems
2015-01-30 14:53:54 +02:00
ookami.kb
9e3fe0c1c8 fixed charset problems 2015-01-30 13:23:35 +01:00
Martin Rusev
b0566a68f0 Merge pull request #41 from amuzhou/master
fix parser bug
2015-01-28 06:39:48 +02:00
amuzhou
b040701d06 修改bug 2015-01-28 11:41:13 +08:00
Martin Rusev
b2d14d534a Merge pull request #40 from shoonoise/master
Fix: imbox crashes when inbox is empty.
2015-01-16 07:43:46 +02:00
shoonoise
cff7b32971 Fix: imbox crashes when inbox is empty. 2015-01-15 19:55:01 +03:00
Martin Rusev
1abf7ba6dc Merge pull request #37 from rbas/master
Add support for python 3
2014-10-24 07:55:00 +03:00
rbas
2975c42cfa Remove support for python 2.6 2014-10-23 23:48:32 +02:00