Re: tmda-ofmipd raises exception on TLS

Ole Wolf <[email protected]>
Newsgroups gmane.mail.spam.tmda.user
Message-ID <[email protected]>
> I'm not too familiar with the use of openssl, and chances are I
> wouldn't know whether I used openssl wrongly if something appears to
> be wrong. Could you suggest an example of how to use openssl to do this?

I guess I said that too early. With Google's help, I've made a  
successful connection to tmda-ofmipd using openssl. openssl writes a  
lot of certificate info that appears to be correct, and eventually I  
get the desired "220 servername ESMTP tmda-ofmipd" response.

Then after entering "AUTH PLAIN
AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ=" (a bogus hash, but
presumably that should just cause tmda-ofmipd to reject the
authentication rather than crashing), tmda-ofmipd crashes:

Data: 'STARTTLS'
Data: 'AUTH PLAIN AGptczFAam1zMS5uZXQAbm90Lm15LnJlYWwucGFzc3dvcmQ='
trying pop3 authentication for [email protected]@localhost:110
pop3 authentication for [email protected]@localhost failed
error: uncaptured python exception, closing channel
<__main__.SMTPSession connected 127.0.0.1:62460 at 0x8fcafec> (<type
'exceptions.ValueError'>: [/usr/lib/python2.5/asyncore.py|read|68]
[/usr/lib/python2.5/asyncore.py|handle_read_event|390]
[/usr/bin/tmda-ofmipd|handle_read|1285]
[/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|inReadEvent|132] [/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|_doReadOp|177] [/usr/bin/tmda-ofmipd|outReadEvent|1312] [/usr/lib/python2.5/asynchat.py|handle_read|137] [/usr/bin/tmda-ofmipd|found_terminator|222] [/usr/bin/tmda-ofmipd|smtp_AUTH|566] [/usr/bin/tmda-ofmipd|auth_challenge|434] [/usr/bin/tmda-ofmipd|auth_verify|416] [/usr/bin/tmda-ofmipd|auth_notify_fail|389] [/usr/bin/tmda-ofmipd|push|189] [/usr/lib/python2.5/asynchat.py|push|160] [/usr/lib/python2.5/asynchat.py|initiate_send|219] [/usr/bin/tmda-ofmipd|send|1331] [/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|setWriteOp|231]  
[/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|_doWriteOp|181]
[/usr/lib/python2.5/site-packages/tlslite/TLSRecordLayer.py|writeAsync|254])

Just to make sure it had nothing to do with EHLO commands and such  
entered after the secure connection had started, I configured  
tmda-ofmipd to start with SSL rather than optional TLS. Connecting  
with an email client configured to use SSL, the ofmipd debug output is:

Incoming connection from: ('192.168.1.2', 31233)
Incoming connection to: ('192.168.1.2', 8025)
Data: 'EHLO hostname'
error: uncaptured python exception, closing channel  
<__main__.SMTPSession connected 192.168.1.2:31233 at 0x9546d4c> (<type  
'exceptions.ValueError'>: [/usr/lib/python2.5/asyncore.py|read|68]  
[/usr/lib/python2.5/asyncore.py|handle_read_event|390]  
[/usr/bin/tmda-ofmipd|handle_read|1285]  
[/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|inReadEvent|132] [/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|_doReadOp|177] [/usr/bin/tmda-ofmipd|outReadEvent|1312] [/usr/lib/python2.5/asynchat.py|handle_read|137] [/usr/bin/tmda-ofmipd|found_terminator|222] [/usr/bin/tmda-ofmipd|smtp_EHLO|463] [/usr/bin/tmda-ofmipd|push|189] [/usr/lib/python2.5/asynchat.py|push|160] [/usr/lib/python2.5/asynchat.py|initiate_send|219] [/usr/bin/tmda-ofmipd|send|1331] [/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|setWriteOp|231] [/usr/lib/python2.5/site-packages/tlslite/integration/AsyncStateMachine.py|_doWriteOp|181]  
[/usr/lib/python2.5/site-packages/tlslite/TLSRecordLayer.py|writeAsync|254])

I don't know anything about Python or its exception traces, but it  
seems to me that something is wrong in some "asyncore.py" file?

Any suggestions?

Thanks,

--Ole
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.