New submission from murphdasurf:

The protocol should run like this:

send: 'ehlo XXXXXXXXXXXXX\r\n'
reply: b'250-XXXXXXXXXXXXXXXXXX.com\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-SIZE 100480000\r\n'
reply: b'250-VRFY\r\n'
reply: b'250-ETRN\r\n'
reply: b'250-STARTTLS\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250 DSN\r\n'
reply: retcode (250); Msg: b'XXXXXXXXXXXXXXXX.com\nPIPELINING\nSIZE 
100480000\nVRFY\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
send: 'STARTTLS\r\n'
reply: b'220 2.0.0 Ready to start TLS\r\n'
reply: retcode (220); Msg: b'2.0.0 Ready to start TLS'
send: 'ehlo XXXXXXXXXXXXXXXXXXXXX\r\n'
reply: b'250-XXXXXXXXXXXXXXXXXX.com\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-SIZE 100480000\r\n'
reply: b'250-VRFY\r\n'
reply: b'250-ETRN\r\n'
reply: b'250-AUTH LOGIN\r\n'
reply: b'250-AUTH=LOGIN\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250 DSN\r\n'
reply: retcode (250); Msg: b'XXXXXXXXXXXXXXXXXXXXXX.com\nPIPELINING\nSIZE 
100480000\nVRFY\nETRN\nAUTH 
LOGIN\nAUTH=LOGIN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
send: 'AUTH LOGIN XXXXXXXXXXXXXXX\r\n'
reply: b'334 RRRRRRRRRRR\r\n'
reply: retcode (334); Msg: b'RRRRRRRRR'
send: 'TTTTTTTTTTTT=\r\n'
reply: b'235 2.7.0 Authentication successful\r\n'
reply: retcode (235); Msg: b'2.7.0 Authentication successful'


And in fact it does so on Windows. However, on Linux it runs like this:

send: 'ehlo XXXXXXXXXXXXX\r\n'
reply: b'250-XXXXXXXXXXXXX.com\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-SIZE 100480000\r\n'
reply: b'250-VRFY\r\n'
reply: b'250-ETRN\r\n'
reply: b'250-STARTTLS\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250 DSN\r\n'
reply: retcode (250); Msg: b'XXXXXXXXXXXXX.com\nPIPELINING\nSIZE 
100480000\nVRFY\nETRN\nSTARTTLS\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
send: 'STARTTLS\r\n'
reply: b'220 2.0.0 Ready to start TLS\r\n'
reply: retcode (220); Msg: b'2.0.0 Ready to start TLS'
send: 'ehlo XXXXXXXXXXXXX\r\n'
reply: b'250-XXXXXXXXXXXXX.com\r\n'
reply: b'250-PIPELINING\r\n'
reply: b'250-SIZE 100480000\r\n'
reply: b'250-VRFY\r\n'
reply: b'250-ETRN\r\n'
reply: b'250-AUTH LOGIN\r\n'
reply: b'250-AUTH=LOGIN\r\n'
reply: b'250-ENHANCEDSTATUSCODES\r\n'
reply: b'250-8BITMIME\r\n'
reply: b'250 DSN\r\n'
reply: retcode (250); Msg: b'XXXXXXXXXXXXX.com\nPIPELINING\nSIZE 
100480000\nVRFY\nETRN\nAUTH 
LOGIN\nAUTH=LOGIN\nENHANCEDSTATUSCODES\n8BITMIME\nDSN'
send: 'AUTH LOGIN XXXXXXXXXXXXXXX\r\n'
reply: b'334 RRRRRRRRRRR\r\n'
reply: retcode (334); Msg: b'RRRRRRRRRRR'
send: "b''\r\n"
reply: b'535 5.7.8 Error: authentication failed: another step is needed in 
authentication\r\n'
reply: retcode (535); Msg: b'5.7.8 Error: authentication failed: another step 
is needed in authentication'

The last sent message is an empty string and then the authentication fails. All 
other tokens which are replaced by XXXXXX, RRRRR or TTTTT are exactly the same.

This way the login fails and I can not use smtplib to send my mail.

----------
components: Library (Lib)
messages: 300986
nosy: murphdasurf
priority: normal
severity: normal
status: open
title: smtplib on linux fails to log in correctly
type: behavior
versions: Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue31302>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to