Has anyone created a simple POP3 and SMTP server using TWISTED?

Steve Holden sholden at holdenweb.com
Mon Mar 17 16:30:53 EST 2003


"Donn Cave" <donn at drizzle.com> wrote in message
news:1047616632.623178 at yasure...
> Quoth Zoo Keeper <candiazoo at attbi.com>:
> | I thought I'd be looking more along the lines of pop3d and smtpd in that
> | case.  BeOS is not rich with server code that is free.  There is a
version of
> | Enamel that works, but is flaky.  I could also wait for Zeta to be
released,
> | which might solve some of my problems, especially if they implement a
full
> | network api as the various unix's have.
>
> Might, or might be a mixed blessing if that new network implementation
> has some rough edges.  I can't think of any feature missing from 5.0
> that would rule out a basic TCP server like SMTP or POP3 (well, you
> know that because you have one.)  I can't say it's extremely robust,
> sure not the best thing about BeOS, but it does implement the basics.
>
I think that part of the thread is based on a misunderstanding. Some of us
assumed that the OP wanted to build the mail servers to provide
otherwise-missing functionality from common environments. If it's either a)
a fun project or b) to provide something that doesn't yet exist in the OP's
environment then it's perfectly acceptable to write such servers in Python.

I, for one, was trying to avoid the need for the OP to invent a wheel that's
been rolling for decades now.

> But there are some limitations.  One that comes to mind is that an
> open socket doesn't survive across a fork, so you may want to start

If this is so, how does inetd work?

> with a single-threaded server that deals with each connection one
> by one.  That should work for POP and SMTP, though probably will need
> a select with timeout in front of all reads, so the occasional stuck
> client doesn't jam the works.
>
I'm not sure I can agree with this. Are you suggesting that it isn't
possible to concurrently handle multiple connections to the same server
port, or am I misunderstanding?

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html







More information about the Python-list mailing list