Announcement

Collapse
No announcement yet.

[SOLVED] Testing SMTP mail relay via telnet

Collapse
This topic is closed.
X
X
 
  • Filter
  • 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 glog.properties file on the OTM app server. Look for the following parameter:
    Code:
    glog.mail.smtp.host=smtp.company.com
    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.
    Code:
    telnet smtp.company.com 25 
    Connected to smtp.company.com.
    Escape character is '^]'.
    220 smtp.company.com ESMTP Sendmail Switch-2.2.8/Switch-2.2.8; Thu, 7 Jun 2007 01:01:01 -0500
    HELO company.com
    250 smtp.company.com Hello [otm.company.com], pleased to meet you
    MAIL FROM: [email protected]
    250 2.1.0 [email protected] Sender ok
    RCPT TO: [email protected]
    250 2.1.5 [email protected] Recipient ok
    DATA
    354 Enter mail, end with "." on a line by itself
    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
    QUIT
    221 2.0.0 smtp.company.com closing connection
    Connection closed by foreign host.
    If relaying is denied, you'll see the following error:
    Code:
    RCPT TO: [email protected]
    550 5.7.1 [email protected] Relaying denied.  IP name lookup failed [192.168.1.1]
    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
    Chris Plough
    twitter.com/chrisplough
    MavenWire

  • #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.

    Comment


    • #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
      Chris Plough
      twitter.com/chrisplough
      MavenWire

      Comment

      Working...
      X