Opened 10 years ago

Closed 10 years ago

#4609 enhancement closed fixed (fixed)

More examples for twisted.mail (servers)

Reported by: Pepijn de Vos Owned by:
Priority: normal Milestone:
Component: mail Keywords:
Cc: Thijs Triemstra Branch:


I am currently trying to write a SMTP server using Twisted. Since not all of twisted.mail is documented, the examples that are there where a huge help.

The problem is that the only example for the server side is a barebones SMTP server. It would be really helpful if there where more examples about other basic ingredients every serious SMTP server needs. These include:

  • authentication
  • extensions and commands

I have attached an example based of the current SMTP example implementing PLAIN and LOGIN authentication. Other examples appreciated.

Attachments (1)

emailserver.tac (2.6 KB) - added by Pepijn de Vos 10 years ago.
ESMTP server with PLAIN and LOGIN authentication

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by Pepijn de Vos

Attachment: emailserver.tac added

ESMTP server with PLAIN and LOGIN authentication

comment:1 Changed 10 years ago by khorn

If someone were to add examples of the various things suggested in the ticket description, it seems like it would be fairly straightforward to turn the "series" of examples into a full-blown mail server tutorial (though it might be better to handle that on a separate say #3324)

comment:2 Changed 10 years ago by khorn

Owner: Jean-Paul Calderone deleted

comment:3 Changed 10 years ago by Thijs Triemstra

Cc: Thijs Triemstra added

I guess the attached emailserver.tac duplicates a lot of code from the existing emailserver.tac, not sure if and how we want to do something about that without making things more complicated.

comment:4 Changed 10 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Jean-Paul Calderone

If we treat the attached as a replacement version of emailserver.tac, I think things look okay. It's a strict improvement, as far as I can tell. In the future, please submit patches instead of entire modified files though! :)

I do, however, agree with khorn about having a real series of examples of a mail server. I think it would be nice to do this in the style of web in 60 seconds. However, we can improve this email example as an intermediate step towards that goal.

comment:5 Changed 10 years ago by Jean-Paul Calderone

Resolution: fixed
Status: newclosed

(In [29965]) Integrate auth changes to emailserver.tac example

Author: pepijn Reviewer: exarkun Fixes: #4609

Add authentication using twisted.cred to the Twisted Mail email server example.

comment:6 Changed 9 years ago by <automation>

Owner: Jean-Paul Calderone deleted
Note: See TracTickets for help on using tickets.