Closed nixiam closed 2 years ago
Hi, Guys! Faced a similar problem Python 3.9.1 IMAP_TOOLS latest
I have no mailbox with TLS support. Hope for info from anyone.
I got the same error earlier when I used "starttls=True" instead of "starttls=False".
starttls=True - start the conversation unencrypted and later (with the starttls command) switch to encrypted communication starttls=False - start the conversation encrypted
If you use the "starttls=True" instead of "starttls=False" your program connect to the server and try to read the IMAP server greetings but the server doesn't send it because it waits the client hello part of the SSL protocol. Finally the client return withe the "socket error: EOF" error.
Thanks to all. If anyone see how to improve lib logic - let me know, or just do it.
May anyone check it https://github.com/ikvk/imap_tools/pull/157 - MailBoxTls Is it good enough interface? Is it works correct?
May be someone knows public mail that supports STARTTLS?
STARTTLS logic moved to MailBoxTls
Hello, meanwhile, thank you for the work you have done.
I'm having trouble using the module by forcing the ssl context.
Indeed this code works
tls_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
tls_context.set_ciphers('DEFAULT@SECLEVEL=1')
server = imaplib.IMAP4(email_credentials['Host'])
server.starttls(ssl_context=tls_context)
server.login(email, email_credentials['Password'])
but this
tls_context = ssl.SSLContext(ssl.PROTOCOL_TLSv1_2)
tls_context.set_ciphers('DEFAULT@SECLEVEL=1')
mailbox = MailBox(email_credentials['Host'], ssl_context=tls_context, starttls=True)
mailbox.login(email, email_credentials['Password'])
not work, returning "socket error: EOF" error
I'm using python 3.8.11 and imap-tools 0.46.0