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 :

It’s really simple to use :

  1. Download the .zip
  2. Extract it
  3. Make “” executable
  4. Kill any process using port 25 (usually “sudo pkill sendmail” is enough)
  5. Type “sudo ./” 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
  • Awesome! Really interested in trying it out. Out of curiosity, why not just tar and gzip the file to preserve the executable permissions? I’d say this is more or less the norm on Linux.

  • Also curious why the choice of MTA would make any difference.

    • I don’t think it will make any difference. But, since I never worked with anything other than Sendmail, I’m not very sure. These MTAs can be a pain at times!

      • I just don’t see why there would be any interaction with the MTA whatsoever.

  • Pingback: An SMTP server for testing | Thought Flow()

  • QA Testv


    Great work, can this be used on Linux system to receive MIME message?