Missing Calendar items after PST import

  • Hi,

    I have a problem with missing calendar items after importing mailboxes from PSTs.

    They are visible in the list view of the webapp and when I click on them and save, they become visible in the calendar view as well.

    Any advise how to make them all visible via script?

    our versions:



    I digged a little bit into it and checked what properties are changing, when I save it:
    The PR_MESSAGE_SIZE and the PR_LAST_MODIFICATION_TIME changes obviously.
    Then the PR_LAST_MODIFIER_NAME_W changes from SYSTEM to tw (the user name)

    Then this 5 properties are added:
    Property(appointment:33299) Duration (minutes) 33299 0x80130003 510
    Property(common:34051) Reminder 34051 0x81a3000b False
    Property(common:34068) 34068 0x81b4000b True
    Property(common:34070) 34070 0x81b60040 2019-12-19 08:00:00
    Property(common:34071) 34071 0x81b70040 2019-12-19 16:30:00

    I don’t think that this information helps, but what do I know? ;-)

  • I managed to fix it by myself.

    Just did a
    item.create_prop(0x81b60040, value=item.start)
    item.create_prop(0x81b70040, value=item.end)

    over all calendar items. This makes them visible again.
    I can post the whole script later, if someone needs it.

    you should run this is a tmux or screen session!

    # This script sets all the special start and stop kopano properties for all calendar entries
    # To fix the following problem:
    # User PST files are imported in Kopano, but calendar items doesn't appear in calendar view
    # (only in list view)
    # If an entry in list view is clicked and saved, it becomes visible in calendar view as well
    # To make them all visible at once for all users run this script
    import kopano
    calendar_name = 'Kalender'
    server = kopano.Server()
    for user in server.users():
        cal = None
        for folder in user.store.folders():
            if folder.name == calendar_name:
                cal = folder
                print('Kalender gefunden')
        if not cal:
            print('kein Kalender da?')
        for item in cal.items():
            item.create_prop(0x81b60040, value=item.start)
            item.create_prop(0x81b70040, value=item.end)
        print(' ')
        print(' ')

Log in to reply