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

    Delete Mails in public folder automatically by script ?

    Kopano Groupware Core
    3
    6
    549
    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.
    • AnotherAndy
      AnotherAndy last edited by

      Good morning,

      we use an UCS System with kopano for our developers and their test-Emails.
      To make these mails available for everyone we use public folders.
      After 6 months we have over 500k Emails in one folder. Now we’d like to delete all mails until the last 30 days.
      I found the script kopano-cleanup.py, but as far as I understood it only deletes Mails in the junk and recycle-bin folder.

      Is there another possibility delete mails in public folders automatically by script.

      best regards
      Andreas

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

        HI @AnotherAndy ,

        I faced the same issue a few days ago and, on the same site you found that script, there is another that does what you want.

        Please see: https://stash.kopano.io/projects/KSC/repos/core-tools/browse/delete-items

        Regards.
        JG

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

          great! @jasgggit Thanks! :-)

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

            @AnotherAndy that scripts is by default not fixed to a specific folder, but will instead delete all messages of a give user. this is something you should be aware of.

            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
            • AnotherAndy
              AnotherAndy last edited by AnotherAndy

              @fbartels thanks - I used the dry-run parameter and it’s only a development system. But thanks for the info

              @jasgggit
              sure you cleandup public folders with this script?

              If i try it:
              python delete-items.py -u test-mails --from 2018-01-01 --until 2019-03-30 --dry-run
              Runnig for user test-mails
              Search items in Calendar
              Search items in Contacts
              Search items in Conversation Action Settings
              Search items in Deleted Items
              Search items in Drafts
              Search items in Inbox
              Search items in Journal
              Search items in Junk E-mail
              Search items in Notes
              Search items in Outbox
              Search items in Quick Step Settings
              Search items in RSS Feeds
              Search items in Sent Items
              Search items in Suggested Contacts
              Search items in Tasks

              Deleted items :0

              bed8c3fd-1a46-45b3-81e1-cbf608c30454-grafik.png

              It looks like its just going into the mailbox, but not in de public folder associated with this user.
              regards
              Andreas

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

                Hi @AnotherAndy @fbartels

                Sorry for the quick post, as it seems I haven’t analyzed well the question, and just wanted to provide a quick response. Need to pay more attention to this, note to myself.

                @fbartels - Thank you to point that out.

                @AnotherAndy , yes, I used the script to clear ALL emails up to a certain data, and it was the only one that worked for me, to accomplish this task, but I don’t use public folders, so my as I said, I thought it would do it.

                Regards.
                JG

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