31.3. SMTP diagnostics, statistics and debug

31.3.1. SMTP diagnostics

The following commands are used to display the diagnostics of the SMTP resource:

d d smtp

Shows the state of the resource.

d de smtp

Shows the state of the resource, and information about SMTP sessions.

[10:25:56] ABILIS_CPX:d d smtp   

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       STATE:ACTIVE   CUR-SES:10       ACTIVE-IN:0        ACTIVE-OUT:0        
       MIX-IN:0       MIX-OUT:0        QUEUE-OUT:0        QUEUE-DEFER:0        
       ------------------------------------------------------------------------
[10:31:49] ABILIS_CPX:d de smtp

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       STATE:ACTIVE   CUR-SES:10       ACTIVE-IN:0        ACTIVE-OUT:0        
       MIX-IN:0       MIX-OUT:0        QUEUE-OUT:0        QUEUE-DEFER:0        
       - Smtp Sessions --------------------------------------------------------
       CH TYPE TCP-State LocAdd-LocPort        RemAdd-RemPort        SMTP-State
       ------------------------------------------------------------------------
       0  OUT  READY                                                 READY
       1  OUT  READY                                                 READY
       2  IN   LISTEN    000.000.000.000-25                          READY
       3  IN   LISTEN    000.000.000.000-25                          READY
       4  IN   LISTEN    000.000.000.000-25                          READY
       5  IN   LISTEN    000.000.000.000-25                          READY
       6  IN   LISTEN    000.000.000.000-25                          READY
       7  IN   LISTEN    000.000.000.000-25                          READY
       8  IN   LISTEN    000.000.000.000-25                          READY
       9  IN   LISTEN    000.000.000.000-25                          READY

31.3.2. SMTP statistics

The following commands are used to display the statistics of the SMTP resource:

d s smtp

Shows the statistics of the SMTP resource, such as the number of successful incoming TCP connections (CALL-SUCC in), the number of successful outgoing TCP connections (CALL-SUCC out), the number of unsuccessful incoming TCP connections (CALL-FAIL in), the number of unsuccessful outgoing TCP connections (CALL-FAIL out), the number of accepted external mails (EXT-SUCC), etc.

d se smtp

Shows the statistics of the SMTP resource for each session.

[10:31:53] ABILIS_CPX:d s smtp

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       --- Cleared 5 days 19:51:30 ago, on 26/05/2015 at 12:36:53 -------------
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|       1177|CALL-FAIL  |          0|         21|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |         19|NOTIFY-LT  |           |         19|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          7|          0|INT-FAIL   |          0|          0|
       DENIED-IP  |          0|           |BANNED-IP  |          0|           |
[10:38:50] ABILIS_CPX:d se smtp

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       --- Cleared 5 days 19:55:58 ago, on 26/05/2015 at 12:36:53 -------------
       - Smtp Sessions --------------------------------------------------------
       CH TYPE TCP-State LocAdd-LocPort        RemAdd-RemPort        SMTP-State
       ------------------------------------------------------------------------
       0  OUT  READY                                                 READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        217|CALL-FAIL  |          0|          6|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          2|NOTIFY-LT  |           |          2|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       1  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        180|CALL-FAIL  |          0|          5|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          1|NOTIFY-LT  |           |          1|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       2  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        216|CALL-FAIL  |          0|          2|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          1|NOTIFY-LT  |           |          1|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       3  OUT  READY                                                 READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        153|CALL-FAIL  |          0|          2|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          1|NOTIFY-LT  |           |          1|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       4  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        184|CALL-FAIL  |          0|          2|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          1|NOTIFY-LT  |           |          1|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       5  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|        136|CALL-FAIL  |          0|          1|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          2|NOTIFY-LT  |           |          2|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       6  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|         70|CALL-FAIL  |          0|          1|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          7|NOTIFY-LT  |           |          7|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       7  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|         21|CALL-FAIL  |          0|          2|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          4|NOTIFY-LT  |           |          4|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       8  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|          0|CALL-FAIL  |          0|          0|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          0|NOTIFY-LT  |           |          0|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------
       9  IN   LISTEN    000.000.000.000-25                          READY
       -----------|---INPUT---|--OUTPUT---|-----------|---INPUT---|--OUTPUT---|
       CALL-SUCC  |          0|          0|CALL-FAIL  |          0|          0|
       EXT-SUCC   |          0|          0|EXT-FAIL   |          0|          0|
       NOTIFY     |           |          0|NOTIFY-LT  |           |          0|
       NOTIFY-SUCC|           |          0|NOTIFY-FAIL|           |          0|
       LOCAL-SUCC |          0|          0|LOCAL-FAIL |          0|          0|
       RELAY-SUCC |          0|          0|RELAY-FAIL |          0|          0|
       INT-SUCC   |          0|          0|INT-FAIL   |          0|          0|
       ------------------------------------------------------------------------

31.3.3. SMTP debug

Type the following command to view the commands allowed:

[15:29:42] ABILIS_CPX:debug res:smtp

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       BufferLength:64512  Date/Time:02/08/2016 15:34:42 TraceTime:5048386

Usage:

   LSN:0                                      - This help
   LSN:1                                      - Debug
   LSN:3                                      - Show session log
   LSN:3 CMD:CLR                              - Clear session log
   LSN:4 CMD:From:To:Subject:Message          - Send internal mail
[Note]Note

To use these commands you need to have administrator or super user rights.

Type the following command to view the SMTP session log:

[15:34:42] ABILIS_CPX:debug res:smtp lsn:3

RES:Smtp ----------------------------------------------------------------------
       Simple_Mail_Transfer_Protocol                                           
       BufferLength:64512  Date/Time:02/08/2016 15:36:09 TraceTime:5136243

02/08 14:10:25 [PORT] Starting server...
02/08 14:10:32 [IN]  Receiving message: 84A582F6
02/08 14:10:32 [  0] Waiting events (listen or wake-up)
02/08 14:10:32 [  1] Waiting events (listen or wake-up)
02/08 14:10:32 [  2] Waiting events (listen or wake-up)
02/08 14:10:32 [  3] Waiting events (listen or wake-up)
02/08 14:10:32 [  0] Start out-bound session
02/08 14:10:32 [  4] Waiting events (listen or wake-up)
02/08 14:10:32 [  5] Waiting events (listen or wake-up)
02/08 14:10:32 [  6] Waiting events (listen or wake-up)
02/08 14:10:32 [  7] Waiting events (listen or wake-up)
02/08 14:10:32 [  8] Waiting events (listen or wake-up)
02/08 14:10:32 [  9] Waiting events (listen or wake-up)
02/08 14:10:33 [IN]  Receiving message: 84A582F7
02/08 14:10:33 [  0] Delivering message: 84A582F6
02/08 14:10:33 [  0] DNS solving relay server: mail.test.it
02/08 14:10:33 [  1] Start out-bound session
02/08 14:10:33 [  1] Delivering message: 84A582F7