Troubleshoot email delivery issues using telnet
search cancel

Troubleshoot email delivery issues using telnet

book

Article ID: 155021

calendar_today

Updated On:

Products

Messaging Gateway

Issue/Introduction

You need to troubleshoot email delivery issues when emails are not delivered by Symantec Messaging Gateway (SMG).

Any number of errors may be related to this issue, found in a non-delivery report (NDR) or a packet capture.

Resolution

To determine why email is not being delivered:

Inbound mail from the internet is not being received

The following process will allow you to test whether the Messaging Gateway inbound SMTP listener is accepting messages.

  1. Open a PuTTy session and login as "admin".
  2. At the prompt type: "telnet -b 127.0.0.1 <IP of inbound> 25" <enter>
    (NOTE: "-b 127.0.0.1" sets the source IP to the local host and prevents loop detection from blocking the message.)
  3. Once you get a "220" prompt back then continue the telnet session, as follows:
    1. "EHLO example.com" <enter>
    2. "MAIL FROM: <test email address>" <enter>
    3. "RCPT TO: <inside email address that can be checked>" <enter>
    4. "DATA" <enter>
    5. "Subject: Test" <enter>
    6. "To: <inside email address that can be checked>" <enter>
    7. "From: <test email address>" <enter><enter>
    8. "Test" <enter>
    9. "." <enter> (NOTE: This is a period on the line by itself)
  4. Check to see if the email was received. If it was then mail flow through the Messaging Gateway is working.
  5. Check the Message Audit Logs if the email did not go through.

Messages in the delivery queue are not being delivered:

  1. Find an email that is in the delivery queue and unable to be delivered.
  2. Take the domain portion of the email (everything after the @ sign, i.e. [email protected] would be "example.com")
  3. Open a PuTTy session and login as "admin".
  4. Run: "nslookup" <enter>
    1. Type: "set q=mx" <enter>
    2. Type: "example.com" <enter> (replacing example.com with the domain from step 2)
    3. If mail exchanger IP's are returned, copy one for use in the next step and skip to the next step. If only host names are returned, copy one and proceed to the next step.
      1. Type: "set q=a" <enter>
      2. Type: "<Hostname from the previous result>" <enter>
        (Note the IP address returned for use in the next step)
      3. Type: "exit" <enter>
  5. Type: "telnet -b <IP of SMG> <IP from previous step> 25" <enter>
    (NOTE: The "-b <IP of SMG>" after telnet to sets the source IP to the local address configured on SMG)
  6. Once you get a "220" prompt back then continue the telnet session, type each line as follows:
    1. "EHLO example.com" <enter>
    2. "MAIL FROM: <internal email address>" <enter>
    3. "RCPT TO: <external email address at the domain from step 2>" <enter>
    4. "DATA" <enter>
    5. "From: <internal email address>" <enter>
    6. "To: <external email address at the domain from step 2>" <enter>
    7. "Subject: Test" <enter>
    8. <enter> (NOTE: this is an empty line)
    9. "Test" <enter>
    10. <enter> (NOTE: this is an empty line)
    11. "." <enter> (NOTE: This is a period on the line by itself)
    12. "quit"<enter>
  7. Check to see if the email was received. Note any errors that were returned during the telnet session.
  8. If directed, repeat steps 5 - 6 replacing <IP of SMG> with each IP configured on SMG)