Navigation

    Kopano
    • Register
    • Login
    • Search
    • Categories
    • Get Official Kopano Support
    • Recent
    Statement regarding the closure of the Kopano community forum and the end of the community edition

    [Outlook 2013] sent items to addresses and shared contacts from public folder

    Kopano OL Extension (KOE)
    3
    17
    3325
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • baloan
      baloan @Sebastian last edited by baloan

      @Sebastian

      Do you have a reproducible use case?

      Only some To addresses in the Sent Folder are broken, some are not.

      Are all emails from a certain mailbox inside your installation broken?

      No, only some. Also in outbound emails with multiple recipients some are garbled, some are fine.

      Is it an external contact?

      Some external are broken, some are not.

      1 Reply Last reply Reply Quote 0
      • Sebastian
        Sebastian Kopano last edited by

        OK, we would need such a message in a format we can reimport it and try to reproduce the case.
        You would need to:

        1. identify the sourcekey of such a message
        2. export the message with the below python script
        3. send us the dump(s)

        To identify the message:

        • Put your z-push in wbxml log mode
        • do some action on the broken message, e.g. mark it as un/read or flag it in webapp
        • This generates some output in the log updating that message:
        ...
        25/05/2017 20:10:43 [11680] [WBXML] [ol] O      <Modify>
        25/05/2017 20:10:43 [11680] [WBXML] [ol] O       <ServerEntryId>
        25/05/2017 20:10:43 [11680] [WBXML] [ol] O       U98828:99b867e0eac5424982dd39d507add46ba81000000000
        25/05/2017 20:10:43 [11680] [WBXML] [ol] O       </ServerEntryId>
        25/05/2017 20:10:43 [11680] [WBXML] [ol] O       <Data>
        ...
        

        The important part here is 99b867e0eac5424982dd39d507add46ba81000000000. This is the source key of that message.

        Create a short python script to export the message.
        Copy the following code to a new file like export.py

        import kopano
        import sys
        
        user, folder, sourcekey = sys.argv[1:]
        
        server = kopano.Server()
        user = server.user(user)
        
        for item in user.folder(folder):
            if item.sourcekey == sourcekey:
                dump = item.dumps()
                open('dump', 'wb').write(dump)
                break
        

        Then you execute this script with:

        python export.py username Inbox 99b867e0eac5424982dd39d507add46ba81000000000
        

        Where username is your username and Inbox is the folder that contains this message and then the previously identified sourcekey.
        This should generate a dump file in the local directory containing all the data of that message.

        If you have several cases (different dumps) would probably not hurt.

        Thanks,
        Sebastian

        baloan 1 Reply Last reply Reply Quote 0
        • baloan
          baloan @Sebastian last edited by baloan

          @Sebastian Enclosed a link to dump for the message. Also the python script should be modified

              if item.sourcekey == sourcekey.upper():
          

          to accomodate for capitals in item.sourcekey. I found

          28/05/2017 17:36:15 [31316] [WBXML] [andreas] [ol] I      <Modify>
          28/05/2017 17:36:15 [31316] [WBXML] [andreas] [ol] I       <ServerEntryId>
          28/05/2017 17:36:15 [31316] [WBXML] [andreas] [ol] I        Ub254d:f8803d323ad44440918be0673a3da44e02b501000000
          28/05/2017 17:36:15 [31316] [WBXML] [andreas] [ol] I       </ServerEntryId>
          28/05/2017 17:36:15 [31316] [WBXML] [andreas] [ol] I       <Data>
          

          in the log while item.sourcekey was F8803D323AD44440918BE0673A3DA44E02B501000000.
          In case you are curious about the binary content ;-)

          0_1495986553207_Wrong.PNG

          1 Reply Last reply Reply Quote 0
          • Sebastian
            Sebastian Kopano last edited by Sebastian

            Yeah, importing this dump into a test account of course works. I see the receiver just fine.
            I guess you have set your GMX address as email of your GAB user?

            The issue is certainly related to mapitoinet in combination with retrieving the user from the GAB. In my log I also see

            MAPIProvider->getEmailAddressFromSearchKey(): fall back to PR_SEARCH_KEY to resolve user and get email address
            

            This is to set the correct ActiveSync tag. If you also see this, it still doesn’t mean that it’s correct, because OL overwrites these values with the data received from the mail headers it receives, and the error is there (in the generation of these headers).

            Do you still have the WBXML log when this message was synchronized to Outlook? Could you paste the complete WBXML-OUT line?

            If not, you could just reimport the dump file using:

            import sys
            import kopano
            
            server = kopano.Server()
            user = server.user('username')
            
            dump = open('dump', 'rb').read()
            item = user.inbox.create_item(loads=dump)
            
            print(user.inbox.count)
            

            The message should then be synchronized again to your inbox and another WBXML-OUT is generated (please have WBXML debug enabled).

            About the content: Das ist sogar in JEDER Hinsicht falsch, aber trotzdem witzig :)

            baloan 1 Reply Last reply Reply Quote 0
            • baloan
              baloan @Sebastian last edited by

              @Sebastian Actually forgot to mention the WBXML log after setting the message flag in Outlook.

              1 Reply Last reply Reply Quote 0
              • Sebastian
                Sebastian Kopano last edited by

                Ahm, I guess this is a different issue (ical)?

                baloan 1 Reply Last reply Reply Quote 0
                • baloan
                  baloan @Sebastian last edited by

                  @Sebastian This one should be the right one.

                  1 Reply Last reply Reply Quote 0
                  • Sebastian
                    Sebastian Kopano last edited by

                    yeah, that’s the right one but it’s not helping.

                    I would need the WBXML out when the message is synchronized for the first time to Outlook. The easiest to get this should be to re-import the dump into your inbox as a new email with the script above.

                    baloan 1 Reply Last reply Reply Quote 0
                    • baloan
                      baloan @Sebastian last edited by baloan

                      @Sebastian So I did

                      export.py andreas "Sent Items" F8803D323AD44440918BE0673A3DA44E02B501000000
                      root@zeus:~/issue# ll
                      total 168
                      drwxr-xr-x 2 root root   4096 May 30 18:43 ./
                      drwx------ 9 root root   4096 May 30 18:42 ../
                      -rw-r--r-- 1 root root 150861 May 30 18:43 dump
                      -rwxrwxr-x 1 root root    348 May 28 18:09 export.py*
                      -rw-r--r-- 1 root root     84 May 28 18:09 extract.sh
                      -rwxr-xr-x 1 root root    201 May 30 18:42 reimport.py*
                      root@zeus:~/issue# ./reimport.py
                      140
                      

                      and then nothing happened. No update in Outlook, no activity in WBXML log. Took awhile to find the messages in my Inbox sorted date descending. Find the latest log with WBXML-OUT and one more dump here .

                      1 Reply Last reply Reply Quote 0
                      • Sebastian
                        Sebastian Kopano last edited by

                        So, yes… just confirmed this. The conversion from the the MAPI object back to a mime message is faulty and not able to fill in the correct from address, this is why this is happening. In the mime message the from header is already wrong. OL by default takes that value instead of the ActiveSync From (which is sent correctly).

                        I will discuss this with the core developers to see how we can debug this further.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post