Skip to end of metadata
Go to start of metadata

This page is part of the Sapconnect Interface Informations Guide

Whenever an Outbound or Inbound situation appears, it might be necessary to enable ICM trace to get more information from the mailserver.
Taking into account a dummy test for Outbound scenario.

First create the dummy e-mail
  1. In SOST, using menu System -> Short Message;
    or
    In SO00, fill Title, message body and the e-mail address;
  2. In SOST, check if the e-mail is in waiting status. It shall appear in the queue as follows.
    Consider the date and time for the ICM trace;
  3. While the e-mail is in Waiting status (Yellow icon), activate ICM Trace;
Activate ICM Trace
  1. Go to SMICM transaction;
  2. Menu Goto -> Trace File -> Reset.
    The Reset is necessary to generate a new dev_icm file. Usually there is unnecessary data for SAPConnect analysis;
  3. After Reset. Menu Goto -> Trace Level -> 3 -> Enter;
Execute the dummy test in SOST

With the trace active in level 3, go back to SOST and execute e-mail.

  1. Select the e-mail line;
  2. Hit the  "Start Send Proc. for Selection" button;
  3. Wait the result.
Reset ICM trace back to 1

After execute, reset the ICM trace back to 1 in SMICM.

SMICM -> Goto -> Trace level -> 1 -> Enter;

Collect trace
  1. In SMICM. Menu -> Goto -> Trace file -> Display All (Shift + F5);
  2. It must display this pattern;

    Before the trace starts, it clearly show when the level 3 was set. That is the point to start the analysis in e-mail scenario;
  3. Scroll down the page until find the mail server calls. Identify the connection ID, exampel in Yellow;

This connection follows all the conversation between SAP SMTP service in ICM with the mail server.

Analyze the ICM trace

All the communication shall be recorded under the same connection ID. For this test the ID was "id=11/279851".
The same indification will mark all communication between SAP and the mail server. Any error from the mail server will be recorded in it.

ICM trace example
[Thr 3832] IcmReadFromConn(id=11/279851): read 54 bytes, 1 readops (timeout 0)
[Thr 3832] Address    Offset  IcmReadFromConn received
[Thr 3832] ------------------------------------------------------------------------
[Thr 3832] 00000000071F5518  000000  32323020 6d61696c 67773033 2e776466 |220 amailserverh|
[Thr 3832] 00000000071F5528  000016  2e736170 2e636f72 70204553 4d545020 |ere.domai ESMTP |
[Thr 3832] 00000000071F5538  000032  506f7374 66697820 28446562 69616e2f |Postfix (Debian/|
[Thr 3832] 00000000071F5548  000048  474e5529 0d0a                       |GNU)..          |
[Thr 3832] ------------------------------------------------------------------------
[Thr 3832] SMTP PlugInHandleNetData entry
[Thr 3832] SMTP PlugInHandleNetData: reply = 220 mailserveraddresshere.com ESMTP Postfix (Debian/GNU)
...
[Thr 3832] IcmHandleNetRead(id=11/279851): read_len: 54, HandleNetData returned: 2
[Thr 3832] Address    Offset  IcmWriteToConn:
[Thr 3832] ------------------------------------------------------------------------
[Thr 3832] 000000000C5312A0  000000  45484c4f 2042432e 5352562e 434f4d0d |EHLO BC.SRV.COM.|
[Thr 3832] 000000000C5312B0  000016  0a                                  |.               |
[Thr 3832] ------------------------------------------------------------------------
...
[Thr 8176] IcmReadFromConn(id=11/279851): read 135 bytes, 1 readops (timeout 0)
[Thr 8176] Address    Offset  IcmReadFromConn received
[Thr 8176] ------------------------------------------------------------------------
[Thr 8176] 00000000071F5518  000000  3235302d 6d61696c 67773033 2e776466 |250-mailserverdo|
[Thr 8176] 00000000071F5528  000016  2e736170 2e636f72 700d0a32 35302d50 |mainhere ..250-P|
...
[Thr 8176] IcmHandleNetRead(id=11/279851): read_len: 135, HandleNetData returned: 2
[Thr 8176] Address    Offset  IcmWriteToConn:
[Thr 8176] ------------------------------------------------------------------------
[Thr 8176] 000000000C547730  000000  4d41494c 2046524f 4d3a3c64 6965676f |MAIL FROM:<test|
...
[Thr 7048] IcmReadFromConn(id=11/279851): read 14 bytes, 1 readops (timeout 0)
[Thr 7048] Address    Offset  IcmReadFromConn received
[Thr 7048] ------------------------------------------------------------------------
[Thr 7048] 00000000071F5518  000000  32353020 322e312e 30204f6b 0d0a     |250 2.1.0 Ok..  |
[Thr 7048] ------------------------------------------------------------------------
[Thr 7048] SMTP PlugInHandleNetData entry
[Thr 7048] SMTP PlugInHandleNetData: reply = 250 2.1.0 Ok
...
[Thr 7048] IcmHandleNetRead(id=11/279851): read_len: 14, HandleNetData returned: 2
[Thr 7048] Address    Offset  IcmWriteToConn:
[Thr 7048] ------------------------------------------------------------------------
[Thr 7048] 000000000C575B90  000000  52435054 20544f3a 3c646965 676f2e73 |RCPT TO:<test.t|
...
[Thr 5224] IcmReadFromConn(id=11/279851): read 14 bytes, 1 readops (timeout 0)
[Thr 5224] Address    Offset  IcmReadFromConn received
[Thr 5224] ------------------------------------------------------------------------
[Thr 5224] 00000000071F5518  000000  32353020 322e312e 35204f6b 0d0a     |250 2.1.5 Ok..  |
[Thr 5224] ------------------------------------------------------------------------
Conclusion

Follow the ICM Trace with the ID provided to identify the error and to understand the mail conversation history.