.o8 oooo oooo oooo oooo o8o "888 `888 `888 `888 `888 `"' 888oooo. 888 .oooo. .ooooo. 888 oooo 888 .oo. .ooooo. 888 .ooooo. oooo .ooooo. d88' `88b 888 `P )88b d88' `"Y8 888 .8P' 888P"Y88b d88' `88b 888 d88' `88b `888 d88' `88b 888 888 888 .oP"888 888 888888. 888 888 888 888 888 888ooo888 888 888 888 888 888 888 d8( 888 888 .o8 888 `88b. 888 888 888 888 888 888 .o .o. 888 888 888 `Y8bod8P' o888o `Y888""8o `Y8bod8P' o888o o888o o888o o888o `Y8bod8P' o888o `Y8bod8P' Y8P o888o `Y8bod8P'
Blackhole is a Tornado powered MTA (mail transport agent) that is designed for handling large volumes of email without handling any of the messages and doing no disk bound I/O.
Blackhole is designed mostly for testing purposes and can be used to test numerous things suchs as;
All data sent to blackhole.io will be forgotten instantly, we store nothing you send.
or, send an email to blackhole.io using an @blackhole.io address, any address is fine e.g.:
$ telnet blackhole 25 Trying 220.127.116.11... Connected to blackhole.io. Escape character is '^]'. 220 2.2.0 OK, ready HELO fake.mail.server 250 2.5.0 OK, done MAIL FROM:<email@example.com> 250 2.5.0 OK, done RCPT TO:<firstname.lastname@example.org> 250 2.5.0 OK, done DATA 354 3.5.4 Start mail input; end with <CRLF>.<CRLF> To: Someone <email@example.com> From: User <firstname.lastname@example.org> Subject: Bye Bye bye email . 251 2.5.1 OK, user not local, will forward QUIT 221 2.2.1 Thank you for speaking to me Connection closed by foreign host.
$ openssl s_client -connect blackhole.io:465 CONNECTED(00000003) depth=0 C = GB, ST = London, L = London, O = blackhole.io, OU = blackhole.io, CN = blackhole.io, emailAddress = email@example.com ... snip ... --- 220 2.2.0 OK, ready HELO fake.mail.server 250 2.5.0 OK, done MAIL FROM:<firstname.lastname@example.org> 250 2.5.0 OK, done RCPT TO:<email@example.com> 250 2.5.0 OK, done DATA 354 3.5.4 Start mail input; end with <CRLF>.<CRLF> To: Someone <firstname.lastname@example.org> From: User <email@example.com> Subject: Bye Bye bye email . 251 2.5.1 OK, user not local, will forward QUIT 221 2.2.1 Thank you for speaking to me DONE
Python 2.6 Python 2.7 Python 3.2 Python 3.3 PyPy 1.9 # see notes below PyPy 2.0 # see notes below
Blackhole works on Python 2.6 and 2.7, it also works with PyPy (see Blackhole + PyPy section below).
tornado>=2.2.1,<=3.1 setproctitle>=1.1.6 # setproctitle 1.1.7 and above are required for all PyPy versions deiman>=0.1.4 # older version of Deiman will not work because of API changes
Running tests manually is pretty simple, there is a Make target dedicated to it.
The test suite relies on unittest2 and nose, both if which get installed by the Make target during test running.
There is also a Make target for generating coverage:
PyPy is a Python interpreter and just-in-time compiler. PyPy focuses on speed, efficiency and compatibility with the original CPython interpreter.
Blackhole works well under PyPy 1.9, 2.0 beta1 and 2.0 beta2, you can see performance improvements of up to 30% in certain situations.
However, blackhole does have issues with both PyPy 1.9 and 2.0 beta1 and 2.0 beta2 when using the pre-compiled binaries, this is due to a conflict in the version of OpenSSL compiled in to PyPy and the version compiled in to your CPython installation. If you wish to use blackhole with SSL support on PyPy I suggest you either compile PyPy yourself or try to make sure your PyPy and CPython have the same versions.
A few people have emailed me questions about why blackhole exists, how I use it, why Tornado and things like that so I have outlined some questions and responses in an FAQ.