"Swiss Army Knife SMTP; Command line SMTP testing, including TLS and AUTH" - a full-featured Perl script for testing SMTP servers.