home of the madduck/ blog/
Swiss army knives for SMTP

If you deal with SMTP servers, you probably know swaks, the "Swiss Army Knife for SMTP". Great tool for anything related to sending mails.

Today, I found its counterpart for receiving mails:

python -m smtpd -n -c DebuggingServer localhost:1025

that binds a no-frills SMTP server to the specified socket which does nothing but talk SMTP to connecting clients and print "received" messages to stdout, e.g.:

---------- MESSAGE FOLLOWS ----------
Date: Fri, 22 May 2009 21:21:40 +0200
To: madduck@madduck.net
From: madduck@lotus.madduck.net
Subject: test Fri, 22 May 2009 21:21:40 +0200
X-Mailer: swaks v20061116.0 jetmore.org/john/code/#swaks
X-Peer: 127.0.0.1

This is a test mailing

------------ END MESSAGE ------------

Sweet, very sweet!

NP: Porcupine Tree: Signify