Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6129127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:42:21+00:00 2026-05-23T16:42:21+00:00

I have a twisted webserver with TLS authentication, and it appears to hang when

  • 0

I have a twisted webserver with TLS authentication, and it appears to hang when I connect to it over SMTP. Here is the block of twisted code to start the server:

(Note: certificateData is our private key and public key concatenated together, that appeared to be the only way to get a self signed certificate to work)

customFactory = CustomSMTPFactory(portal)
certificate = PrivateCertificate.loadPEM(certificateData)
contextFactory = certificate.options(certificate)
tlsFactory = TLSMemoryBIOFactory(contextFactory, False, customFactory)

a = service.Application("Custom Server")
internet.TCPServer(5870, tlsFactory).setServiceParent(a)

On the client, this line just hangs waiting to read data:

smtplib.SMTP('localhost',5870)

Any ideas? How do I setup TLS authentication on a twisted webserver?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T16:42:22+00:00Added an answer on May 23, 2026 at 4:42 pm

    Your server starts TLS from the beginning of the connection. Try smtplib.SMTP_SSL instead, so your client expects this.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a pretty intensive chat socket server written in Twisted Python, I start
I have the following: My webserver running on twisted My comet server, aka orbited
I have an XMPP server (likely — python, twisted, wokkel), which I prefer not
I have some Twisted code which creates multiple chains of Deferreds. Some of these
I have the following python code using the twisted API. def function(self,filename): def results(result):
I have the following code (almost an exact copy of the Chat server example
I have an xmlrpc server using Twisted. The server has a huge amount of
I'm using twisted to create a server. Problem is, I must protect my code.
I have this twisted client, which connects with a twisted server having an index.
I have this simple Twisted Client which connects to a Twisted server & queries

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.