Python vs C for a mail server

Jim Segrave jes at nl.demon.net
Sat Jan 28 03:59:14 EST 2006


In article <1138433792.970322.95810 at g43g2000cwa.googlegroups.com>,
Ravi Teja <webraviteja at gmail.com> wrote:
>>> Why don't you use an existing mail server?
>
>Probably because that was his homework assignment for a networking
>class. Not uncommon to be told to implement a server from the scratch
>from the RFC. Although that does not explain his concern about
>performance.
>
>Abhinav, if that is the case, using sockets is more or less the same
>from any language. Python as usual will be cleaner than C. You might
>want to look at Twisted Mail. Use SocketServer module in the standard
>library to implement the RFC. Other than that it is silly to try to
>write a Mail Server unless you have some extra ordinary need.

Any lecturer assigning "write a mail server" as a class project is
doing his/her students a true dis-service. Mail server RFC compliance is a
nightmare to get right, performance issues and mail routeing are both
material for at least a full year's university study.

A student who tries to make an even vaguely RFC compliant mail server
probably won't finish their project, as student who completes such a
project might come away with the mistaken belief that they actually
have done it correctly. 

The number of software products which use eail and do so incorrectly
is astounding and depressing. There's a reason that the source for
sendmail is about 120K lines, exim is nearly 270K lines. Doing it
right is _hard_.





-- 
Jim Segrave           (jes at jes-2.demon.nl)




More information about the Python-list mailing list