python -m smtpd -n -c DebuggingServer localhost:1025
(change port as you see fit, below 1024 requires root/sudoing)