Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP4 SSL isn't working #45823

Closed
tiran opened this issue Nov 21, 2007 · 9 comments
Closed

IMAP4 SSL isn't working #45823

tiran opened this issue Nov 21, 2007 · 9 comments
Labels
stdlib Python modules in the Lib dir

Comments

@tiran
Copy link
Member

tiran commented Nov 21, 2007

BPO 1482
Nosy @tiran
Files
  • b
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2008-02-01.02:53:41.367>
    created_at = <Date 2007-11-21.09:27:55.009>
    labels = ['library']
    title = "IMAP4 SSL isn't working"
    updated_at = <Date 2008-02-01.02:53:55.410>
    user = 'https://github.com/tiran'

    bugs.python.org fields:

    activity = <Date 2008-02-01.02:53:55.410>
    actor = 'janssen'
    assignee = 'janssen'
    closed = True
    closed_date = <Date 2008-02-01.02:53:41.367>
    closer = 'janssen'
    components = ['Library (Lib)']
    creation = <Date 2007-11-21.09:27:55.009>
    creator = 'christian.heimes'
    dependencies = []
    files = ['8921']
    hgrepos = []
    issue_num = 1482
    keywords = ['patch']
    message_count = 9.0
    messages = ['57735', '57744', '58408', '58409', '61897', '61913', '61923', '61942', '61943']
    nosy_count = 4.0
    nosy_names = ['janssen', 'christian.heimes', 'vila', 'dbinger']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1482'
    versions = ['Python 3.0']

    @tiran
    Copy link
    Member Author

    tiran commented Nov 21, 2007

    The SSL version of the imap4 client isnt' working under 3.0. After I
    applied the patch from http://bugs.python.org/issue1210 I tried to
    connect to an IMAP server over SSL. The connection hangs.

    import imaplib
    conn = imaplib.IMAP4_SSL("mailbox.rwth-aachen.de", 993)
    After a while I stopped the attempt with CTRL+C
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1137, in __init__
        IMAP4.__init__(self, host, port)
      File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 184, in __init__
        self.welcome = self._get_response()
      File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 907, in
    _get_response
        resp = self._get_line()
      File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1000, in
    _get_line
        line = self.readline()
      File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1170, in readline
        char = self.sslobj.read(1)
      File "/home/heimes/dev/python/py3k/Lib/ssl.py", line 160, in read
        return self._sslobj.read(len)
    KeyboardInterrupt

    @tiran tiran added the stdlib Python modules in the Lib dir label Nov 21, 2007
    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Nov 21, 2007

    I'll take a look at it this weekend.

    Bill

    On Nov 21, 2007 1:27 AM, Christian Heimes <report@bugs.python.org> wrote:
    >
    > New submission from Christian Heimes:
    >
    > The SSL version of the imap4 client isnt' working under 3.0. After I
    > applied the patch from http://bugs.python.org/issue1210 I tried to
    > connect to an IMAP server over SSL. The connection hangs.
    >
    > import imaplib
    > conn = imaplib.IMAP4_SSL("mailbox.rwth-aachen.de", 993)
    >
    > After a while I stopped the attempt with CTRL+C
    > Traceback (most recent call last):
    >   File "<stdin>", line 1, in <module>
    >   File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1137, in __init__
    >     IMAP4.__init__(self, host, port)
    >   File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 184, in __init__
    >     self.welcome = self._get_response()
    >   File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 907, in
    > _get_response
    >     resp = self._get_line()
    >   File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1000, in
    > _get_line
    >     line = self.readline()
    >   File "/home/heimes/dev/python/py3k/Lib/imaplib.py", line 1170, in readline
    >     char = self.sslobj.read(1)
    >   File "/home/heimes/dev/python/py3k/Lib/ssl.py", line 160, in read
    >     return self._sslobj.read(len)
    > KeyboardInterrupt
    >
    > 

    assignee: janssen
    components: Library (Lib)
    keywords: py3k
    messages: 57735
    nosy: janssen, tiran
    priority: normal
    severity: normal
    status: open
    title: IMAP4 SSL isn't working
    versions: Python 3.0


    Tracker <report@bugs.python.org>
    <http://bugs.python.org/issue1482\>


    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Dec 11, 2007

    I'm still getting this with the latest SSL module fixes. I'm guessing
    this is a problem with the implementation of imaplib, but I haven't
    looked into it yet.

    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Dec 11, 2007

    Here's a fix for the 3K branch.

    @dbinger
    Copy link
    Mannequin

    dbinger mannequin commented Jan 31, 2008

    Bill's patch does appear to fix the ssl-related problem.

    imaplib is still broken in py3k, though, due
    to bytes/str issues.

    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Jan 31, 2008

    But that's bpo-1210, which is still open. David, do you want to
    submit a patch for 1210?

    Meanwhile, do we still need this issue to be open?

    @dbinger
    Copy link
    Mannequin

    dbinger mannequin commented Jan 31, 2008

    On Jan 31, 2008, at 12:42 PM, Bill Janssen wrote:

    Bill Janssen added the comment:

    But that's bpo-1210, which is still open. David, do you want to
    submit a patch for 1210?

    I see that you are correct that 1210 is the bytes/str issue.
    I regret it, but I won't be able to supply a patch.

    Meanwhile, do we still need this issue to be open?

    Unless I'm missing something, the patch "b" that you posted
    has not been checked in. I think the issue should remain
    open until that happens.

    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Feb 1, 2008

    I guess I'll check it in. There's no effective test case for the
    imaplib module, though. So if it's broken, we won't know.

    When I try connecting to my local IMAP server, I get

    >>> c = imaplib.IMAP4("127.0.0.1")
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/local/python/3k/src/Lib/imaplib.py", line 190, in __init__
        raise self.error(self.welcome)
    imaplib.error: b'* OK [CAPABILITY IMAP4rev1 LOGINDISABLED STARTTLS]
    UpLib IMAP Server (V4r1) ready.'
    >>>

    I think this is bug 1210. However, it is able to connect to an
    SSL-protected server (not the one above) and get the same error message,
    so I think the SSL patch works.

    @janssen
    Copy link
    Mannequin

    janssen mannequin commented Feb 1, 2008

    I've committed the patch.

    @janssen janssen mannequin closed this as completed Feb 1, 2008
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant