0

I use lib secure_smtpd for create SMTP server. When I generate certificate and use it for SSL connection I catch exception (for test I use Opera mail client and The Bat!):

SSLError: _ssl.c:489: The handshake operation timed out

When I test use python script everything is ok:

smtpObj = smtplib.SMTP_SSL('localhost',2000)
smtpObj.set_debuglevel(1)
smtpObj.login('testuser', '111111')

msg = MIMEMultipart('alternative')
msg['Subject'] = "my subj SSL"
msg['From'] = sender
msg['To'] = "username@site.com"
msg.attach(MIMEText("Hello world!",'html'))
smtpObj.sendmail(sender, [toemail], msg.as_string())

Can somebody help fix problem with handshake? I use python 2.7.3

Eugene
  • 1,690
  • 3
  • 16
  • 30

1 Answers1

0

How you configured SMTP in Opera and The Bat! ? There is SSL mode (which you seems to use), where all connection is wrapped in SSL/TLS, and STARTTLS mode, where connection is plain but SSL/TLS excahnge is started after client issues STARTTLS command.

Nickolay Olshevsky
  • 13,706
  • 1
  • 34
  • 48