Skip to content

Finally a Dummy SMTP for Linux

Okay picture this: You’re building your awesome web app and suddenly, you have to verify that emails are being sent properly. You’d want some kind of app that would drop emails in a folder, right?

If you were on Windows, that would be fairly easy. Just hit a web search and install one of the many dummy SMTP servers out there.

But you’re probably on Linux (why else would you be reading this). And on Linux, there is no such app. You’ll have to hack your way out of this.

Well not anymore. Thanks to this awesome script by Stuart Colville, I was able to create a dummy SMTP server in Python. I’ve posted the code on github :

https://github.com/jevin/Dummy-SMTP

It’s really simple to use :

  1. Download the .zip
  2. Extract it
  3. Make “listen.py” executable
  4. Kill any process using port 25 (usually “sudo pkill sendmail” is enough)
  5. Type “sudo ./listen.py” on your console
  6. Tada! All emails sent will be dropped in the “mails” folder.

I’ve only tested this with Sendmail. So if you see something weird with other MTAs, let me know!

Published inWeb