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

    Empty/Broken messages

    Kopano Groupware Core
    3
    4
    718
    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.
    • mpraunegger
      mpraunegger last edited by mpraunegger

      Hi,
      One of our customers has following problem after a database crash, caused by a power outage.

      0_1521192619267_Bildschirmfoto 2018-03-16 um 10.29.34.png

      The messages are empty, I cannot open the messages, and I cannot delete or move them.
      But I can see the subjects in Outlook and via the python interface:

      import kopano
      server = kopano.Server()
      store = server.user("wilfried").store
      inbox = store.folder("Inbox")
      for item in inbox:
      	print(item.received, item.subject)
      

      I tried to the the item.entryid, but I get some strange python messages, so I also tried to delete them with python (by adding the sys utf8 stuff):

      import kopano
      server = kopano.Server()
      store = server.user("wilfried").store
      inbox = store.folder("Inbox")
      import sys
      reload(sys)  
      sys.setdefaultencoding('utf8')
      for item in inbox.items():
      	if 'askari online-shop: so können sie ihr passwort ändern' in item.subject.lower():
      		inbox.delete(item)
      

      but then I get the following message back:

      >>> for item in inbox.items():
      ...     if 'askari online-shop: so können sie ihr passwort ändern' in item.subject.lower():
      ...             inbox.delete(item)
      ... 
      Traceback (most recent call last):
        File "<stdin>", line 3, in <module>
        File "/usr/lib/python2.7/dist-packages/kopano/folder.py", line 446, in delete
          item_entryids, folder_entryids, perms, props = self._get_entryids(objects)
        File "/usr/lib/python2.7/dist-packages/kopano/folder.py", line 433, in _get_entryids
          item_entryids = [_unhex(item.entryid) for item in items if isinstance(item, _item.Item)]
        File "/usr/lib/python2.7/dist-packages/kopano/item.py", line 234, in entryid
          return _hex(self._get_fast(PR_ENTRYID, must_exist=True))
        File "/usr/lib/python2.7/dist-packages/kopano/compat.py", line 75, in hex
          return s.encode('hex').upper()
      AttributeError: 'NoneType' object has no attribute 'encode'
      

      Everything else works fine, all other items (mails, calendar items, contacts, z-push…) works pretty well.

      Thank you for your help and tips!

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

        For critical/time sensitive things I would always recommend to rather contact our support directly (assuming you have a aubscription).

        Mapi objects consist of many rows of data in the database and it seems you have a partly corrupt database. I would recommend to go back to the last clean mysql dump.

        Regards Felix

        Resources:
        https://kopano.com/blog/how-to-get-kopano/
        https://documentation.kopano.io/
        https://kb.kopano.io/

        Support overview:
        https://kopano.com/support/

        1 Reply Last reply Reply Quote 0
        • mpraunegger
          mpraunegger last edited by

          The crash happened on March 1st and everything else works perfectly, therefore a recovery isn’t an option, moreover, another one ones again. So there does not exist any tool to repair a mapi object? Or do delete a broken item? kopano-fsck does not help.

          1 Reply Last reply Reply Quote 0
          • A Former User
            A Former User last edited by

            Upgrade to f30b628de8f9d334b014b19d0c33aa9233bc5b78 if you have not yet, maybe that fixes it.

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