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


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 25

      b. EHLO

      c. MAIL FROM: <>

      d. RCPT TO: <>

      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.


           Forum Systems Support





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



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;


Article is closed for comments.