Testing mail servers with swaks

I hadn’t seen this tool before so I figured I would share. Swaks is the swiss army knife SMTP according to the homepage.

I’ve covered testing email from the command line before but this tool sure makes it easier.

swaks --to [email protected] --from [email protected]
*** MX Routing not available: requires Net::DNS.  Using localhost as mail server
=== Trying localhost:25...
=== Connected to localhost.
<-  220 cmdln-laptop ESMTP Exim 4.69 Thu, 16 Apr 2009 12:23:24 -0500
 -> EHLO cmdln-laptop
<-  250-cmdln-laptop Hello localhost [127.0.0.1]
<-  250-SIZE 52428800
<-  250-PIPELINING
<-  250 HELP
 -> MAIL FROM:<[email protected]>
<-  250 OK
 -> RCPT TO:<[email protected]>
<-  250 Accepted
 -> DATA
<-  354 Enter message, ending with "." on a line by itself
 -> Date: Thu, 16 Apr 2009 12:23:24 -0500
 -> To: [email protected]
 -> From: [email protected]
 -> Subject: test Thu, 16 Apr 2009 12:23:24 -0500
 -> X-Mailer: swaks v20061116.0 jetmore.org/john/code/#swaks
 -> 
 -> This is a test mailing
 -> 
 -> .
<-  250 OK id=1LuVJ6-0007ge-Jf
 -> QUIT
<-  221 cmdln-laptop closing connection
=== Connection closed with remote host.

One Comment

  • Twirrim Windows Vista Firefox 3.0.8 wrote:

    A colleague introduced me to it a couple of years ago and I’ve never looked back since. I can, and will, quite happily send e-mails using telnet, but I’ll often make a typo and find that screws up the process. Swaks allows me to do it all so much faster and with less hassle. Plus it can be triggered from cron for some metrics testing if you’re that way inclined.

Leave a Reply

Your email is never shared.Required fields are marked *

To submit your comment, click the image below where it asks you to...
Clickcha - The One-Click Captcha