This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A smtpd server impletement based on Gevent

Project Description

SMTP servers impletement base on Gevent

Install

pip install gsmtpd

Usage

Basically gsmtpd is ported from Python standard lib smtpd, you can it check from Doc

however there is only one difference, you should add monkey patch of gevent

from gevent import monkey
monkey.patch_all()

Example

from gevent import monkey
monkey.patch_all()
from gsmtpd.server import SMTPServer

class DebuggingServer(SMTPServer):
    # Do something with the gathered message
    def process_message(self, peer, mailfrom, rcpttos, data):
        inheaders = 1
        lines = data.split('\n')
        print '---------- MESSAGE FOLLOWS ----------'
        for line in lines:
            # headers first
            if inheaders and not line:
                print 'X-Peer:', peer[0]
                inheaders = 0
            print line
        print '------------ END MESSAGE ------------'

if __name__ == "__main__":

    server = DebuggingServer()
    server.serve_forever()

Performance

The charts below shows gsmtpd vs asyncore based smtpd in Python standrary lib.

Note

Response per second = 0 means the program is crashed or refuse to connect

Release History

Release History

This version
History Node

0.2

History Node

0.1.9.3

History Node

0.1.9.2

History Node

0.1.9.1

History Node

0.1.9

History Node

0.1.8

History Node

0.1.7

History Node

0.1.6

History Node

0.1.5

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
gsmtpd-0.2.tar.gz (9.6 kB) Copy SHA256 Checksum SHA256 Source Dec 22, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting