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

    Deleting attachments from deleted accounts

    General Discussion
    2
    9
    987
    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.
    • Caldwell
      Caldwell last edited by

      What tool is used to delete attachments from /var/lib once an account has been removed in LDAP?

      I just removed 5 accounts. I then ran the db-remove-unreferenced-attachments.pl script, but the attachments for those users still exist.

      What else needs to be done?

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

        Interestingly enough, I ran the command again and it found 20-30 unreferenced attachments. Then I ran it again, and it found some more. Same thing a third time. So … what gives? How do I just run this once and get ALL the unreferenced attachments deleted at one time, and is there any other way to close out an e-mail account fully?

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

          I also ran db-remove-orphaned-attachments command. It gave this output:

          Finding all orphaned attachments…
          Processing 4240 orphaned attachments
          Cleaning singleinstances…
          Cleaning lob…
          Flush database changes to disk…
          Done.

          However, a GREP on the directory STILL shows attachments in the name of accounts which have been deleted. And the disk size didn’t change based on a “du” check of the folder.

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

            If you delete a user, the store belonging to.the user becomes orphaned. You have to delete the orphan with kopano-cli/kopano-admin.

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

              Yes, I know. That’s already been done. I’m wanting to know about the attachments which apparently aren’t deleted even after the store is deleted. Any thoughts on those?

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

                Then, there must still be a reference to it.

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

                  We run a script which deletes the userid from LDAP and then searches for the store and removes it. That’s done all at one time. Where could there possibly still be a reference to a non-existent store? I’m just trying to clean up GB of disk space.

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

                    When you are using LMTP then attachments in mails delivered to multiple recipients are just stored once on disk, but referenced from multiple mailboxes.

                    Its not a reference to a store, but a reference to the attachment i am talking about.

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

                      Will have to do more digging on some of the attachments referenced and see. Thanks.

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