SMTP Tool for Testing ....

SMTP Tool for Testing ....

by Ken Task -
Number of replies: 2
Picture of Particularly helpful Moodlers

A moodle using an stmp server usually requires turning on debugging to see what (if any is discovered) attemtping to use an SMTP server as a relay.

Run Linux?  Having SMTP server troubles?  Have command line access via ssh
and can install software?  Well then ...

Found a CLI tool ... a perl script that can to as well.   Requires Perl.   Can be installed an run in user space (ie, doesn't require root).

SWAKS - Swiss Army Knife for SMTP

http://www.jetmore.org/john/code/swaks/

Ref docs:
http://www.jetmore.org/john/code/swaks/latest/doc/ref.txt

Questions:
http://www.jetmore.org/john/code/swaks/faq.html

Can be installed by user in user space ... example provided below.   Does not require root.

Example quickie showing localhost MTA ... with identification info edited:

[ktask@www ~]$ ls
mail  swaks
[ktask@www ~]$ ./swaks
To: ktask@[somenet].net
=== Trying aspmx.l.google.com:25...
=== Connected to aspmx.l.google.com.
<-  220 mx.google.com ESMTP e30si3516457ote.49 - gsmtp
 -> EHLO site.sending.network
<-  250-mx.google.com at your service, [xxx.xxx.xxx.xxx]
<-  250-SIZE 157286400
<-  250-8BITMIME
<-  250-STARTTLS
<-  250-ENHANCEDSTATUSCODES
<-  250-PIPELINING
<-  250-CHUNKING
<-  250 SMTPUTF8
 -> MAIL FROM:<ktask@[senddingsite.somenet].net>
<-  250 2.1.0 OK e30si3516457ote.49 - gsmtp
 -> RCPT TO:<ktask@[somenet].net>
<-  250 2.1.5 OK e30si3516457ote.49 - gsmtp
 -> DATA
<-  354  Go ahead e30si3516457ote.49 - gsmtp
 -> Date: Fri, 26 Aug 2016 15:34:00 -0400
 -> To: ktask@[somenet].net
 -> From: ktask@[senddingsite.somenet].net
 -> Subject: test Fri, 26 Aug 2016 15:34:00 -0400
 -> X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/
 ->
 -> This is a test mailing
 ->
 -> .
<-  250 2.0.0 OK 1472240040 e30si3516457ote.49 - gsmtp
 -> QUIT
<-  221 2.0.0 closing connection e30si3516457ote.49 - gsmtp
=== Connection closed with remote host.

If one adds options to the command can test sending to your SMTP relay server.

Server admins need all the helpful tools they can get, IMHO!     SWAKS is one ... again IMHO.

'spirit of sharing', Ken



Average of ratings: Useful (2)
In reply to Ken Task

Re: SMTP Tool for Testing ....

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Yeh - SMTP is a big, nasty black hole for a lot of users and admins. 

I have quite a lot of experience with building and running MTAs and it really only serves to remind me how little I understand of it mixed

In reply to Howard Miller

Re: SMTP Tool for Testing ....

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> serves to remind me how little I understand of it

Reminded me the Sendmail rules' syntax!
;-(
Average of ratings: Useful (1)