Telnet - SMTP Commands (not enough)

There are lots of articles online that will teach you, "How to connect to a mail server using telnet and send an mail."  Lots of them have good information on SMTP command syntax.   The problems start when you are trying to do something that is hard or can't be done using telnet.   Because of this I wrote this handy telnet replacement tool for debugging SMTP.  Below are the top reason to use this to test with instead of telnet.

 

  1. Authentication - Sending encoded strings using telnet requires you to build the authentication strings yourself using a mime tool.   This tool has authentication built in so you can just specify the user name and password.
  2. TLS Encryption - This tool has the ability to connect using SSL directly or issue the StartTLS command and work securely.
  3. Telnet protection - Many servers do not allow commands to be send one character at a time.  When they detect this they will disconnect you thinking you are a hacker.   This tool will buffer the response while you type and send the full command when finished.
  4. Multihomed IP Address selection and binding - Telnet will always use the main IP on the machine.   When using this tool you can choose from any IP address on the local machine.  This makes trouble shooting IP address reputation issues very easy.   For example if a single IP is black listed you can easily test using that IP.
  5. Remembering SMTP Commands - This tool has macros built in for MAIL FROM, RCPT TO, DATA, and many other commands so you don't need RFC 2821 with you while testing. 

 

The SMTP Server Connection Diagnostics Tool, released by SocketLabs, Inc. can be found here: http://www.socketlabs.com/smtp-server-connection-diagnostics-tool/

 

Moving IP addresses from one Windows machine to another.

Here is a useful command for moving bulk IP's from one windows machine to another.

 

Export the ip's to a file.

c\>netsh interface ipv4 dump > c:\ipstomove.txt

then import the list to another machine.

c:\>netsh -f c:\ipstomove.txt

 

Things to note:  When exporting to the file it will export using the existing interface name.  If the new machine has a different interface name this will cause problems.  You can open the file in notepad and do a replace to correct this if needed.\

Additional Tip.  If you are adding a range of IPs you can use a loop.  The below command adds a C block of address or a /24 CIDR (255 ip addresses).  Again make sure you use the correct network adapter name.


FOR /L %I IN (2,1,254) DO netsh interface ip add address "Local Area Connection" 10.0.0.%I 255.255.255.0