This is a simple SMTP Server that can have a chain of mail processors inserted, this is not a production tool, and was written for teaching purposes.
$ go build ./cmd/john
$ ./john smtp
$ echo "This is the message body and contains the message" | mailx -v -r \
"someone@example.com" -s "This is the subject" -S smtp="localhost:2525" \
testing@example.com
$ go test ./...