No announcement yet.

[SOLVED] Testing SMTP mail relay via telnet

This topic is closed.
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Testing SMTP mail relay via telnet

    Often, on new installations, there are issues with OTM sending out email notifications to implementers, carriers, etc. In order to help troubleshoot these, I usually test the email relay server manually via telnet in order to ensure it is working.

    First, get the email server that OTM is configured to use from the file on the OTM app server. Look for the following parameter:
    Also get the user that the OTM server is configured to send mail as from the same file:For this example, we'll send a test email to [email protected]. To test via telnet, run the following commands (marked in bold) from a DOS or Unix command prompt. Make sure to run these commands from the OTM App server, to test the connection as if OTM you were the OTM server.
    [B]telnet 25[/B] 
    Connected to
    Escape character is '^]'.
    220 ESMTP Sendmail Switch-2.2.8/Switch-2.2.8; Thu, 7 Jun 2007 01:01:01 -0500
    250 Hello [], pleased to meet you
    [B]MAIL FROM: [email protected][/B]
    250 2.1.0 [email protected]... Sender ok
    [B]RCPT TO: [email protected][/B]
    250 2.1.5 [email protected]... Recipient ok
    354 Enter mail, end with "." on a line by itself
    [B]Subject: Test email from OTM App server
    This is a test email from the OTM App server.  Wheeeeeeeee!
    250 2.0.0 156K62L05857 Message accepted for delivery
    221 2.0.0 closing connection
    Connection closed by foreign host.
    If relaying is denied, you'll see the following error:
    [B]RCPT TO: [email protected]
    [/B]550 5.7.1 [email protected]... Relaying denied.  IP name lookup failed []
    Alternately, if you don't receive the email at the destined email box, the issue is likely with your mail server or some intermediary mail server and you can begin troubleshooting from there.

    Hope this helps!

    Chris Plough

  • #2
    Re: Testing SMTP mail relay via telnet

    The only thing i would add is that on a lot of implementations, the first outbound email communication that gets tested is the shipment tender notification to the service provider.

    In this case, OTM uses the LOGISTICS involved party contact defined on the order base, which gets copied to the shipment, as the basis of the email address for the "From:" contact on the outbound email.

    If you are seeing issues with tender notifications not being generated, check that you have a LOGISTICS involved party on your order base / shipment and that the email address of that LOGISTICS involved party contact is a valid email address on your SMTP server.


    • #3
      Re: Testing SMTP mail relay via telnet

      That is a very valid point - thank you!

      One more note, I've also seen email addresses (To and From) included within integration files (XML and/or CSV control files), so you may need to check these for the From email address that is used and ensure it is also valid for yoru SMTP server.

      Chris Plough