Article Source madduck
May 22, 2009, 12:29 pm
May 22, 2009, 12:29 pm
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: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
From: This e-mail address is being protected from spambots. You need JavaScript enabled to view it
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