Search code examples
pythonclojuresmtpimappop3

Writing a Python mail server with authentication


I'm trying to write a simple mail server using Python.

I found smtpd that can be used as a simple smtp server, but I don't think it supports any form of authentication.

For pop or imap, I haven't found anything at all yet.

I do know Twisted has some support for both smtp and pop or imap, but I can't find any examples or tutorials about it.

An alternative would be to use Clojure, but I still have the same question:

Which libraries should I use and is there any documentation about them?


Solution

  • Here is an example from Twisted.

    And the main page. Follow the link for documentation to find the example and a tutorial.

    Edit:

    Check the attachment for this ticket for an example IMAP server. Definitely read the thread as it talks about the shortcomings of the example.