How To: Using Telnet to Manually Test an SMTP Policy in Sentry

A simple means of testing SMTP servers and proxies is to use a Telnet client.  Telneting to the target server/proxy at the port listening for an SMTP connection allows for troubleshooting many common issues. This articles provides an example of how Telnet can be used to test an SMTP Policy setup on Sentry. 

I.    Configure the XML Policy and corresponding SMTP Network Policies:

  1.  Under Gateway--> Network Policies click New to add a SMTP Listener and then again to add a SMTP Remote Policy
  2.  Under Gateway-->Content Policy-->XML or HTML Policies click to add a Content Policy to using the Listener and Remote policies created in step #1 above

SMTP_1.png

II. Manually test the XML Policy using command line Telnet as described below: 

 1.  Set the System log level to Debug.  This is found under Diagnostics-->Logging-->Settings

 2.  Using a Telnet client, issue the following commands one at a time to test the policy (hint - type carefully as backspaces could have an adverse impact):

 

      a. telnet 10.5.1.223 25

      b. EHLO support.forumsys.com

      c. MAIL FROM: <qa@forumsys.com>

      d. RCPT TO: <support@forumsys.com>

      e. data

      f. Subject: Message Sent from Manual Telnet Testing

      g. <CR> Hit Return to insert a bank line separating headers from message body

       h. This is a test.  Please, ignore.

           Thanks,

           Forum Systems Support

 

SMTP_2.png

SMTP_3.png

 

3.  Check the System Log on Sentry to see the communication between the Telnet client and Sentry (no errors should be shown):

SMTP_4.png

 

Finally, it maybe necessary to create a custom filter when testing SMTP using a Telnet client.  This is due to the fact that a filter match mostly relies on a Content-Type sent with a regular client.  When using Telnet the tendency is to not do this so you might encounter errors.  To avoid this issue you will need to create a custom filter and associate this filter to the content policy:

 

 

Click New to add a custom message filter as follows;

Have more questions? Submit a request

0 Comments

Article is closed for comments.