Axel Beckert: Useful but Unknown Unix Tools: Swiss Army Knife for SMTP
Which mail server administrator hasn t tested his servers using telnet
on port 25, speaking SMTP himself? And which of them made a typo and
had to retype everything due to missing readline support of telnet? If
you want to check SMTP over SSL aka SMTPS, you had to use
openssl s_client -connect yourserver:465
. And what did you
use to check TLS support on port 25?
Just forget about those hassles and use swaks (Debian package), the Swiss Army Knife for SMTP. It does all the
annoying stuff (using the correct syntax, typing fast enough, SSL,
TLS, etc.) for you while still giving you full control over the SMTP
session, especially showing you all input and output:
$ swaks -t abe@noone.org -s sym.noone.org -q RCPT === Trying sym.noone.org:25... === Connected to sym.noone.org. <- 220 sym.noone.org ESMTP Postfix (Debian/GNU) -> EHLO nemo.deuxchevaux.org <- 250-sym.noone.org <- 250-PIPELINING <- 250-SIZE 10240000 <- 250-ENHANCEDSTATUSCODES <- 250 8BITMIME -> MAIL FROM:<abe@nemo.deuxchevaux.org> <- 250 2.1.0 Ok -> RCPT TO:<abe@noone.org> <** 450 4.2.0 <abe@nemo.deuxchevaux.org>: Sender address rejected: Greylisted, see http://postgrey.schweikert.ch/help/noone.org.html -> QUIT <- 221 2.0.0 Bye === Connection closed with remote host.Since the moment I discovered swaks, I never telnetted to port 25 anymore.