Quantcast
Channel: Pegasus Mail Community Support
Viewing all articles
Browse latest Browse all 1735

SMTP test tool

$
0
0

Folks,

Looking at today's posts of GRC's Usenet I found a tool some of you may wanna try. The author also provides the full source code of the application. Following below, some of author's notes:

Wrote the tool quite some time ago for my personal needs, but since it may be useful for other people willing to run checks on SMTP servers and since it's useful for diagnostic purposes, I thought to share it, the zip file is available at this URL

http://www.mvps.org/bitbucket/smtptest.zip

and contains the 32 bits exe and the full "C" sources, the program is a simple commandline tool which may be used to perform some checks toward an SMTP server (or even the "FakeMX"), running the program without any arguments will show the following help

smtptest: simple SMTP server checking tool
Version 4.7 written by ObiWan Feb-2017

usage: smtptest [-option [value]] server_or_domain

option          option meaning/usage
------------      ------------------------------------------
-p port         SMTP port for connection (default=25)
-h helo         HELO/EHLO string to use (default=DNS-PTR)
-e                use HELO instead of EHLO
-a type         AUTH type 1=PLAIN, 2=LOGIN
-U user         AUTH user name
-P pass         AUTH password
-x                send a HELP command to the server
-f fromaddr    use this address as the "from" (-c/-r)
-c address     check <address> using VRFY/EXPN
-r recipient     try an RCPT TO <recipient>
-M filename   send an email from file contents
-t timeout      connect/response timeout (default=10000)
-n retries       number of retries on error (default=1)
-d delay        delay between retries (default=30000)
-i                  ignore SMTP 5xx codes (keep going)
-T                use TCP only for DNS queries (no UDP)
-I                 use ICMP to check if the host is alive
-m               test all MX for the given domain
-C               enable colors
-o               dump traffic in readable format
-v                enable verbose/debug logging mode
-?               shows this help text
------------     ------------------------------------------

examples: smtptest mx1.hotmail.com
                smtptest -t 30000 -v mx2.hotmail.com
                smtptest -r postmaster@live.com mx3.hotmail.com
                smtptest -xm hotmail.com

notice that while the program may optionally be used to send an email message, I purposely didn't optimize that part so hopefully it won't be abused as a "spam tool", also, the program currently doesn't support SSL, time ago I started fiddling with schannel code, but then I didn't go on and add it to the program, willing to do so, the best approach would probably be adding an "sslsock.c" module exposing the needed functions and then modifying the "smtptest.c" code to add calls to the module to deal with either implicit or explicit SSL modes.


Viewing all articles
Browse latest Browse all 1735