Created
October 9, 2012 14:44
-
-
Save vongrippen/3859266 to your computer and use it in GitHub Desktop.
Slow SMTP Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import datetime | |
import asyncore | |
from smtpd import SMTPServer | |
import time | |
class EmlServer(SMTPServer): | |
def process_message(self, peer, mailfrom, rcpttos, data): | |
time.sleep(6) | |
pass | |
def run(): | |
foo = EmlServer(('0.0.0.0', 29), ('localhost', 25)) | |
try: | |
asyncore.loop() | |
except KeyboardInterrupt: | |
pass | |
if __name__ == '__main__': | |
run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment