OPENCHANGE-MAPI-SENDMAIL

From OpenChange wiki

Jump to: navigation, search


Contents

Objectives

This torture test reproduces MAPI client behavior when it sends mail to Exchange users using Microsoft Exchange Protocols.

Running the test

 smbtorture --dump-data -Uusername%secret_pass                                    \
   --option="exchange:nspi_binding=ncacn_np:192.168.0.20[]"                       \
   --option="mapi:to=test2,kerih,Admini" --option="mapi:subject= A second mail"   \
   --option="mapi:body=It works like a charm. This mail has been generated with   \
                       the OPENCHANGE-MAPI-SENDMAIL torture test. If you want to  \
                       read futher documentation on this, visit our wiki:         \
                       http://wiki.openchange.org"                              \
   'ncacn_ip_tcp:192.168.0.20[35000,print]' OPENCHANGE-MAPI-SENDMAIL

smbtorture parameters

  • mapi:profile_store: Path to the profile database
  • mapi:profile: profile to use
  • -Uusername%secretpass: These are the credentials for DCERPC/AUTH3 authentication on epmapper and emsmdb/nspi endpoints
  • --option="exchange:nspi_binding=ncacn_np:192.168.0.20[]" : binding string for the Windows Adress Book on NSPI endpoint.
  • --option="mapi:to=test2,kerih,Admini": recipients the mail should be delivered to. Partial names (if existing) will be solved by the address book.
  • --option="mapi:subject= A second mail": the mail subject
  • --option="mapi:body="": the mail body
  • ncacn_ip_tcp:192.168.0.20[print]: the binding string the EMSMDB interface will use
  • OPENCHANGE-MAPI-SENDMAIL: The torture test we are running

Remarks

  • If your profile database is at the default location $HOME/.openchange/profiles.ldb and you have set a default profile using mapiprofile -S you can ommit both the mapi:profile_store and mapi:profile options.
  • The test doesn't handle external recipients properly.

Torture Test Output

Loading openchange torture test
Using seed 1170810980
   EcDoConnect: struct EcDoConnect
       in: struct EcDoConnect
           name                     : '/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn=Administrator'
           unknown1: ARRAY(3)
               unknown1                 : 0x00000000 (0)
               unknown1                 : 0x1eeebaac (518961836)
               unknown1                 : 0x00000000 (0)
           code_page                : 0x000004e4 (1252)
           input_locale: struct input_locale
               language                 : 0x0000040c (1036)
               method                   : 0x00000409 (1033)
           unknown2                 : 0xffffffff (4294967295)
           unknown3                 : 0x0001 (1)
           emsmdb_client_version: ARRAY(3)
               emsmdb_client_version    : 0x000a (10)
               emsmdb_client_version    : 0x0000 (0)
               emsmdb_client_version    : 0x1013 (4115)
           alloc_space              : *
               alloc_space              : 0x00000000 (0)
   EcDoConnect: struct EcDoConnect
       out: struct EcDoConnect
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           unknown4: ARRAY(3)
               unknown4                 : 0x0000ea60 (60000)
               unknown4                 : 0x00000006 (6)
               unknown4                 : 0x00002710 (10000)
           session_nb               : *
               session_nb               : 0x0012 (18)
           org_group                : *
               org_group                : '/O=OPENCHANGE ORGANIZATION/OU=FIRST ADMINISTRATIVE GROUP/CN=RECIPIENTS/CN='
           user                     : *
               user                     : 'Administrator'
           store_version: ARRAY(3)
               store_version            : 0x0006 (6)
               store_version            : 0x1b20 (6944)
               store_version            : 0x0003 (3)
           emsmdb_client_version: ARRAY(3)
               emsmdb_client_version    : 0x000a (10)
               emsmdb_client_version    : 0x0000 (0)
               emsmdb_client_version    : 0x1013 (4115)
           alloc_space              : *
               alloc_space              : 0xd23230ee (3526504686)
           result                   : MAPI_E_SUCCESS (0x0)
   EcDoConnect              : MAPI_E_SUCCESS (0x0)
   NspiBind                 : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x0000006c (108)
               length                   : 0x0068 (104)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0xfe (254)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 254)
                       mapi_OpenMsgStore: struct OpenMsgStore_req
                           col                      : 0x00 (0)
                           codepage                 : 0x00000c01 (3073)
                           padding                  : 0x00000000 (0)
                           row                      : 0x00 (0)
                           mailbox_path             : '/o=OpenChange Organization/ou=First Administrative Group/cn=Recipients/cn=Administrator'
                   mapi_request             : (handles) number=1
                       handle id                : 0xffffffff (4294967295)
               length                   : *
                   length                   : 0x006c (108)
               max_data                 : 0x0200 (512)
   EcDoRpc: struct EcDoRpc
       out: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_response            : *
               mapi_response            : length=168
               mapi_response: ARRAY(166)
                   mapi_repl: struct EcDoRpc_MAPI_REPL
                       opnum                    : 0xfe (254)
                       mapi_flags               : 0x00 (0)
                       error_code               : MAPI_E_SUCCESS (0x0)
                       u                        : union EcDoRpc_MAPI_REPL_UNION(case 254)
                       mapi_OpenMsgStore: struct OpenMsgStore_repl
                           PR_OBJECT_TYPE           : MAPI_STORE (0x1)
                           folder_id: ARRAY(13)
                               folder_id                : 0x1928000000000001 (1812698850016624641)
                               folder_id                : 0x1b28000000000001 (1956814038092480513)
                               folder_id                : 0x1c28000000000001 (2028871632130408449)
                               folder_id                : 0x1a28000000000001 (1884756444054552577)
                               folder_id                : 0x1d28000000000001 (2100929226168336385)
                               folder_id                : 0x1e28000000000001 (2172986820206264321)
                               folder_id                : 0x1f28000000000001 (2245044414244192257)
                               folder_id                : 0x2028000000000001 (2317102008282120193)
                               folder_id                : 0x2328000000000001 (2533274790395904001)
                               folder_id                : 0x2428000000000001 (2605332384433831937)
                               folder_id                : 0x2128000000000001 (2389159602320048129)
                               folder_id                : 0x2228000000000001 (2461217196357976065)
                               folder_id                : 0x2528000000000001 (2677389978471759873)
                           unknown3                 : 0x07 (7)
                           entryid: struct MAPIUID
                               ab: ARRAY(16)
                                   [0]                      : 0x40 (64)
                                   [1]                      : 0xc8 (200)
                                   [2]                      : 0x47 (71)
                                   [3]                      : 0xdc (220)
                                   [4]                      : 0xd0 (208)
                                   [5]                      : 0x23 (35)
                                   [6]                      : 0x5c (92)
                                   [7]                      : 0x4e (78)
                                   [8]                      : 0xa7 (167)
                                   [9]                      : 0x32 (50)
                                   [10]                     : 0x2f (47)
                                   [11]                     : 0x83 (131)
                                   [12]                     : 0xa8 (168)
                                   [13]                     : 0x5a (90)
                                   [14]                     : 0xfb (251)
                                   [15]                     : 0x96 (150)
                           default_store            : 0x0001 (1)
                           msgstore: struct MAPIUID
                               ab: ARRAY(16)
                                   [0]                      : 0x17 (23)
                                   [1]                      : 0xd8 (216)
                                   [2]                      : 0x9c (156)
                                   [3]                      : 0xe9 (233)
                                   [4]                      : 0xaf (175)
                                   [5]                      : 0x25 (37)
                                   [6]                      : 0xa7 (167)
                                   [7]                      : 0x4d (77)
                                   [8]                      : 0x87 (135)
                                   [9]                      : 0x5f (95)
                                   [10]                     : 0x36 (54)
                                   [11]                     : 0xcb (203)
                                   [12]                     : 0x4d (77)
                                   [13]                     : 0x9e (158)
                                   [14]                     : 0x0d (13)
                                   [15]                     : 0xe5 (229)
                           ts_access: struct FILETIME
                               dwLowDateTime            : 0x03011206 (50401798)
                               dwHighDateTime           : 0x07d70207 (131531271)
                           creation_date            : 'î4�½çBã�'
                           terminator               : 0x00 (0)
                           unknown4                 : 0x0100 (256)
               mapi_response            : (handles) number=1
                   handle id                : 0x00000105 (261)
           length                   : *
               length                   : 0x00ac (172)
           result                   : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x00000017 (23)
               length                   : 0x000f (15)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0x02 (2)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 2)
                       mapi_OpenFolder: struct OpenFolder_req
                           handle                   : 0x0100 (256)
                           folder_id                : 0x1a28000000000001 (1884756444054552577)
                           unknown                  : 0x00 (0)
                   mapi_request             : (handles) number=2
                       handle id                : 0x00000105 (261)
                       handle id                : 0xffffffff (4294967295)
               length                   : *
                   length                   : 0x0017 (23)
               max_data                 : 0x0200 (512)
   EcDoRpc: struct EcDoRpc
       out: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_response            : *
               mapi_response            : length=10
               mapi_response: ARRAY(8)
                   mapi_repl: struct EcDoRpc_MAPI_REPL
                       opnum                    : 0x02 (2)
                       mapi_flags               : 0x01 (1)
                       error_code               : MAPI_E_SUCCESS (0x0)
                       u                        : union EcDoRpc_MAPI_REPL_UNION(case 2)
                       mapi_OpenFolder: struct OpenFolder_repl
                           unknown                  : 0x0000 (0)
               mapi_response            : (handles) number=2
                   handle id                : 0x00000105 (261)
                   handle id                : 0x00000106 (262)
           length                   : *
               length                   : 0x0012 (18)
           result                   : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x00000019 (25)
               length                   : 0x0011 (17)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0x06 (6)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 6)
                       mapi_CreateMessage: struct CreateMessage_req
                           unknown                  : 0x0100 (256)
                           max_data                 : 0x0fff (4095)
                           folder_id                : 0x1a28000000000001 (1884756444054552577)
                           padding                  : 0x00 (0)
                   mapi_request             : (handles) number=2
                       handle id                : 0x00000106 (262)
                       handle id                : 0xffffffff (4294967295)
               length                   : *
                   length                   : 0x0019 (25)
               max_data                 : 0x0200 (512)
   EcDoRpc: struct EcDoRpc
       out: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_response            : *
               mapi_response            : length=9
               mapi_response: ARRAY(7)
                   mapi_repl: struct EcDoRpc_MAPI_REPL
                       opnum                    : 0x06 (6)
                       mapi_flags               : 0x01 (1)
                       error_code               : MAPI_E_SUCCESS (0x0)
                       u                        : union EcDoRpc_MAPI_REPL_UNION(case 6)
                       mapi_CreateMessage: struct CreateMessage_repl
                           padding                  : 0x00 (0)
               mapi_response            : (handles) number=2
                   handle id                : 0x00000106 (262)
                   handle id                : 0x0000010b (267)
           length                   : *
               length                   : 0x0011 (17)
           result                   : MAPI_E_SUCCESS (0x0)
   NspiResolveNames         : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x00000145 (325)
               length                   : 0x0141 (321)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0x0e (14)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 14)
                       mapi_ModifyRecipients: struct ModifyRecipients_req
                           flags                    : MODRECIP_NULL (0x0)
                           prop_count               : 0x0005 (5)
                           properties: ARRAY(5)
                               properties               : PR_OBJECT_TYPE (0xFFE0003)
                               properties               : PR_DISPLAY_TYPE (0x39000003)
                               properties               : PR_7BIT_DISPLAY_NAME (0x39FF001E)
                               properties               : PR_SMTP_ADDRESS (0x39FE001E)
                               properties               : PR_SEND_INTERNET_ENCODING (0x3A710003)
                           cValues                  : 0x0003 (3)
                           recipient: ARRAY(3)
                               recipient: struct recipients
                                   idx                      : 0x00 (0)
                                   reserved                 : 0x01000000 (16777216)
                                   headers: struct recipients_headers
                                       unknown                  : 0x004a0451 (4850769)
                                       display_name             : 'test2'
                                       full_name                : 'test2'
                                       username                 : 'test2 test2_last_name'
                                       prop_count               : 0x0005 (5)
                                       padding                  : 0x00 (0)
                                       prop_values              : DATA_BLOB length=40
                               recipient: struct recipients
                                   idx                      : 0x01 (1)
                                   reserved                 : 0x01000000 (16777216)
                                   headers: struct recipients_headers
                                       unknown                  : 0x004a0451 (4850769)
                                       display_name             : 'kerihu_j'
                                       full_name                : 'Julien'
                                       username                 : 'Julien Kerihuel'
                                       prop_count               : 0x0005 (5)
                                       padding                  : 0x00 (0)
                                       prop_values              : DATA_BLOB length=46
                               recipient: struct recipients
                                   idx                      : 0x02 (2)
                                   reserved                 : 0x01000000 (16777216)
                                   headers: struct recipients_headers
                                       unknown                  : 0x004a0451 (4850769)
                                       display_name             : 'Administrator'
                                       full_name                : 'Administrator'
                                       username                 : 'Administrator'
                                       prop_count               : 0x0005 (5)
                                       padding                  : 0x00 (0)
                                       prop_values              : DATA_BLOB length=56
                   mapi_request             : (handles) number=1
                       handle id                : 0x0000010b (267)
               length                   : *
                   length                   : 0x0145 (325)
               max_data                 : 0x0200 (512)
   EcDoRpc: struct EcDoRpc
       out: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_response            : *
               mapi_response            : length=8
               mapi_response: ARRAY(6)
                   mapi_repl: struct EcDoRpc_MAPI_REPL
                       opnum                    : 0x0e (14)
                       mapi_flags               : 0x00 (0)
                       error_code               : MAPI_E_SUCCESS (0x0)
                       u                        : union EcDoRpc_MAPI_REPL_UNION(case 14)
                       mapi_ModifyRecipients: struct ModifyRecipients_repl
               mapi_response            : (handles) number=1
                   handle id                : 0x0000010b (267)
           length                   : *
               length                   : 0x000c (12)
           result                   : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x000000ec (236)
               length                   : 0x00e8 (232)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0x0a (10)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 10)
                       mapi_SetProps: struct SetProps_req
                           unknown                  : 0x00 (0)
                           values: struct mapi_SPropValue_array
                               sprop_count              : 0x0003 (3)
                               sprop_array: ARRAY(3)
                                   sprop_array: struct mapi_SPropValue
                                       ulPropTag                : PR_SUBJECT (0x37001E)
                                       value                    : union mapi_SPropValue_CTR(case 30)
                                       lpszA                    : 'A second mail'
                                   sprop_array: struct mapi_SPropValue
                                       ulPropTag                : PR_BODY (0x1000001E)
                                       value                    : union mapi_SPropValue_CTR(case 30)
                                       lpszA                    : 'It works like a charm. This mail has been generated with the OPENCHANGE-MAPI-SENDMAIL torture test. If you want to read futher documentation on this, visit our wiki: http://wiki.openchange.org'
                                   sprop_array: struct mapi_SPropValue
                                       ulPropTag                : PR_MESSAGE_FLAGS (0xE070003)
                                       value                    : union mapi_SPropValue_CTR(case 3)
                                       l                        : 0x00000008 (8)
                   mapi_request             : (handles) number=1
                       handle id                : 0x0000010b (267)
               length                   : *
                   length                   : 0x00ec (236)
               max_data                 : 0x0200 (512)
   EcDoRpc: struct EcDoRpc
       out: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_response            : *
               mapi_response            : length=10
               mapi_response: ARRAY(8)
                   mapi_repl: struct EcDoRpc_MAPI_REPL
                       opnum                    : 0x0a (10)
                       mapi_flags               : 0x00 (0)
                       error_code               : MAPI_E_SUCCESS (0x0)
                       u                        : union EcDoRpc_MAPI_REPL_UNION(case 10)
                       mapi_SetProps: struct SetProps_repl
                           unknown                  : 0x0000 (0)
               mapi_response            : (handles) number=1
                   handle id                : 0x0000010b (267)
           length                   : *
               length                   : 0x000e (14)
           result                   : MAPI_E_SUCCESS (0x0)
   EcDoRpc: struct EcDoRpc
       in: struct EcDoRpc
           handle                   : *
               handle: struct policy_handle
                   handle_type              : 0x00000000 (0)
                   uuid                     : 78d083e5-76af-49c0-a2a8-8b1769231cf2
           size                     : 0x00000200 (512)
           offset                   : 0x00000000 (0)
           mapi_request             : *
               mapi_len                 : 0x0000000a (10)
               length                   : 0x0006 (6)
                   mapi_request: struct EcDoRpc_MAPI_REQ
                       opnum                    : 0x32 (50)
                       mapi_flags               : 0x00 (0)
                       u                        : union EcDoRpc_MAPI_REQ_UNION(case 50)
                       mapi_SubmitMessage: struct SubmitMessage_req
                           unknown                  : 0x0000 (0)
                   mapi_request             : (handles) number=1
                       handle id                : 0x0000010b (267)
               length                   : *
                   length                   : 0x000a (10)
               max_data                 : 0x0200 (512)
   EcDoRpc                  : UNKNOWN_ENUM_VALUE (0x26C608)
   NspiUnbind               : UNKNOWN_ENUM_VALUE (0x1)
Personal tools
Toolbox