gsmtpd
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.
Metadata
Release files for gsmtpd 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gsmtpd-0.2.tar.gz | 9.6 kB | Without provenance | Details for gsmtpd-0.2.tar.gz |
Release files / gsmtpd-0.2.tar.gz
| Download URL | gsmtpd-0.2.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
261d4dabd018d89622373f941db7216731019d736f6f6e296e0e4d71a2191eca
|
|
BLAKE2b-256 checksum How to use checksums |
2737dd7cae474a8334d1d43903696d9a5777b85e891e14a8873d060356331133
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for gsmtpd 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.