Python: fake smtp server

root's picture

This is simple and neat.
Haven't found any use for it yet but worth to have it around :)

Run our fake SMTP server:

sonic:~# python -m smtpd -n -c DebuggingServer 192.168.11.22:25

Test our fake SMTP server:

venus:~# telnet 192.168.11.22 25
Trying 192.168.11.22...
Connected to 192.168.11.22.
Escape character is '^]'.
220 192.168.11.22 Python SMTP proxy version 0.2
^]
telnet> q
Connection closed.

Source: https://muffinresearch.co.uk/fake-smtp-server-with-python/

Thou shalt not steal!

If you want to use this information on your own website, please remember: by doing copy/paste entirely it is always stealing and you should be ashamed of yourself! Have at least the decency to create your own text and comments and run the commands on your own servers and provide your output, not what I did!

Or at least link back to this website.