Support Center > Search Results > SecureKnowledge Details
How to step through mail issues with sendmail and telnet Technical Level


In a scenario when emails are not making it to a particular destination, it is required to use another method to test SMTP connectivity that could result from a non-exisest recipient to other possible issues in the process.

Follow these steps:

  1. Utilizing sendmail on the Security Gateway or Management server.

    1. Create a simple text file for test email

    2. [Expert@HOSTNAME:0]# touch sendmail_test <enter>

    3. Edit the file. 

    4. [Expert@HOSTNAME:0]# vi sendmail_test <enter>

    5. Add the following syntax to the "sendmail_test" file through vi command.

    6. *Format to be replaced by your relevant input* 

      FROM ADDRESS (can be anything)

      *For Example*
      This is the Subject
      This is the Body

    7. Run the command with the 'sendmail_test' file in the present directory.

    8. [Expert@HOSTNAME:0]# $FWDIR/bin/sendmail -t MAIL_SERVER_IP -m sendmail_test <enter>

    9. Check the mail server for mail.

  2. Another method to troubleshoot SMTP connectivity is telnet to a mail server from the Gateway.

    1. Connect over telnet

    2. # telnet MAIL_SERVER_IP 25 <enter>

      Possible Response:

      220 localhost ESMTP

    3. Greet the server by typing (it might be EHLO or HELO)

    4. HELO <enter>

      Possible Response:

      250 Hello.

    5. Tell the server who the mail is from

    6. MAIL FROM:

      Possible Response:

      250 OK

    7. Enter the recipient's address. 

    8. RCPT TO: <enter>

      Possible Response:

      250 OK

    9. Enter data

    10. DATA <enter>

      Possible Response:

      354 OK, send.

      Type your message here in the new line

      Subject: Test sendmail email



      Type message here

      (End the message with a period)

      . <enter> 

      Possible Response:

      250 Queued (9.408 seconds)

    11. Exit the connection

    12. QUIT <enter>

      Possible Response:

      221 goodbye

      Connection closed by foreign host.

    13. Snippet for reference. 

This solution has been verified for the specific scenario, described by the combination of Product, Version and Symptoms. It may not work in other scenarios.

Give us Feedback
Please rate this document