Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    UI for email autoexpunge configuration

    Feature Requests
    email feature-request mail
    6
    14
    685
    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.
    • jimcavoli
      jimcavoli App Dev last edited by jimcavoli

      I would like to be able to configure the autoexpunge option for certain special folders globally for all mailboxes, to allow the mail server to clean up after users who don't purge their Junk or Trash folders periodically. Ideally, this could be optionally configurable for any of the predefined folders so that a clear retention policy, to whatever degree the administrator desires, can be applied to all mailboxes.

      imc67 1 Reply Last reply Reply Quote 7
      • imc67
        imc67 translator @jimcavoli last edited by

        @jimcavoli said in UI for email autoexpunge configuration:

        I would like to be able to configure the autoexpunge option for certain special folders globally for all mailboxes, to allow the mail server to clean up after users who don't purge their Junk or Trash folders periodically. Ideally, this could be optionally configurable for any of the predefined folders so that a clear retention policy, to whatever degree the administrator desires, can be applied to all mailboxes.

        What’s the best way to do this manually in the meanwhile as I noticed users do have full trash folders which take a lot of space and backup time?

        d19dotca 1 Reply Last reply Reply Quote 0
        • d19dotca
          d19dotca @imc67 last edited by d19dotca

          @imc67 I've been pondering this myself. I believe the best way for now would be to run a cronjob on the server which truncates/deletes emails older than a set date (i.e. 60 days) for the file system level. The path for it to run on could be something like the following paths:
          /home/yellowtent/boxdata/mail/vmail/*/mail/.Spam/
          /home/yellowtent/boxdata/mail/vmail/*/mail/.Trash/

          PS - I added this to a collection post I created for all the mail improvements to better highlight them for people and for better discoverability.

          --
          Dustin Dauncey
          www.d19.ca

          1 Reply Last reply Reply Quote 1
          • fbartels
            fbartels App Dev last edited by

            This can directly be configured in dovecot. https://notes.sagredo.eu/en/qmail-notes-185/expunging-expired-junk-and-trash-emails-with-dovecot-124.html

            girish 1 Reply Last reply Reply Quote 3
            • girish
              girish Staff @fbartels last edited by

              @fbartels thanks for sharing! that's an excellent setting.

              "Be aware that the messages saved to Inbox 60 days ago and moved to Junk today will not be deleted."

              I really like this. What this means is that a message has to be in Junk folder for 60 days before removal. So, it doesn't rely on when the mail was delivered.

              I am tempted to just make a 30d default clean up. I think this is the gmail default. Anyone opposes this? We can make it configurable later, but that's a lot more work.

              d19dotca imc67 2 Replies Last reply Reply Quote 5
              • d19dotca
                d19dotca @girish last edited by d19dotca

                @girish I'd love to see this, but I am worried about it being on-by-default in all honesty. Unless you can set it to be a default on new installs only and not impact existing installs?

                My concern would be if it's on by default that it may run and purge a bunch of mail right after upgrading to a new version of Cloudron, and that may negatively impact our own clients for example if someone upgrades without realizing how that particular function will work ahead of time.

                Speaking for myself anyways, I'd prefer to give my clients advanced warning of such a new policy (because that's basically how they'd see it... as a "policy" that now restricts how long they can keep mail in their junk or trash folders). IMO, users should be given advanced notice of such an implementation, which kind of contradicts the on-by-default approach as I'd assume if it's on by default it'd basically start purging emails right after upgrading to the new Cloudron version. Users should be given as much notice as reasonable before anything gets purged. I'd also really like to customize the time-span (i.e. 30 days may be too soon for certain types of clients, I can see a use-case for mine when many of them are medical-oriented and need to be extra careful where I'd want it to be 60 days at least for them in my case for example).

                Ultimately, this seems like one of those features that should definitely be implemented but as off-by-default and with the ability to be customized too. And if customization has to come later, then released but still off-by-default.

                My two cents anyways. πŸ™‚

                --
                Dustin Dauncey
                www.d19.ca

                1 Reply Last reply Reply Quote 2
                • imc67
                  imc67 translator @girish last edited by

                  @girish said in UI for email autoexpunge configuration:

                  I am tempted to just make a 30d default clean up.

                  very good idea, especially because its 30 days AFTER it's moved to the spam or trash folder

                  Is there a way to do that now already (manually)?

                  girish 1 Reply Last reply Reply Quote 1
                  • girish
                    girish Staff @imc67 last edited by

                    @imc67 currently, there is no manual way to do it since it will get overwritten after restart.

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

                      Thought I'd bump this one again... would love to see this added to Cloudron as part of the many Mail improvements needed in the near future. πŸ™‚ Possibly for 7.3?

                      --
                      Dustin Dauncey
                      www.d19.ca

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @d19dotca last edited by

                        @d19dotca We already autoexpunge Spam after 60 days. Do you want something more? This was part of Cloudron 7.

                            mailbox Spam {
                                auto = subscribe
                                special_use = \Junk
                                autoexpunge = 60d
                            }
                        
                        d19dotca R 2 Replies Last reply Reply Quote 0
                        • d19dotca
                          d19dotca @girish last edited by

                          @girish I think it'd be good for admins to have control over that setting (I don't think it's configurable is it?), that is after-all the original intention of the OP, to have a GUI to set email autoexpunge configs. But for me personally, I'd like to do something similar on Trash folder.

                          --
                          Dustin Dauncey
                          www.d19.ca

                          1 Reply Last reply Reply Quote 2
                          • R
                            rodsilva @girish last edited by

                            @girish said in UI for email autoexpunge configuration:

                            @d19dotca We already autoexpunge Spam after 60 days. Do you want something more? This was part of Cloudron 7.

                                mailbox Spam {
                                    auto = subscribe
                                    special_use = \Junk
                                    autoexpunge = 60d
                                }
                            

                            Where can I find this config? I couldn't find this in any file at /etc/dovecot/conf.d/ inside the mail container.

                            Is this configured only for "Spam" folder or also for "Trash" folder?

                            girish 1 Reply Last reply Reply Quote 2
                            • girish
                              girish Staff @rodsilva last edited by

                              @rodsilva This is only for the Spam folder. The configs are under /run/dovecot but you should not make any changes there since they are not persistent. Changes will get overwritten on mail container restart.

                              d19dotca 1 Reply Last reply Reply Quote 1
                              • d19dotca
                                d19dotca @girish last edited by d19dotca

                                @girish When will this be exposed in the GUI? Hopefully this can be planned for 7.4 perhaps, along with the many other mail improvements requested? πŸ˜‰

                                --
                                Dustin Dauncey
                                www.d19.ca

                                1 Reply Last reply Reply Quote 1
                                • First post
                                  Last post
                                Powered by NodeBB