Hi folks,
We’ve been importing an existing mail server into a new Mailcow installation and I’ve noticed that while there is usually in all accounts an existing folder called “Archives” (which comes from Thunderbird’s default parameters), Mailcow (or SOGo?) seems to create a new “Archive” (without “s”) folder that cannot be deleted. This is rather unfortunate, because it would mean changing every Thunderbird installation by hand to use the new archive folder. Is there a way to disable or change this?

We’ve tried to delete, rename, etc the “Archive” folder, but nothing seems to work, it’s here to stay.

Thanks so much!

    • Best Answerset by dave

    aaronsmith
    Alright, I got it this time I think. Here’s what needs to be in data/conf/dovecot/extra.conf:

    namespace inbox {
      mailbox "Archive" {
        auto = no
        special_use = \Archive
      }
      mailbox "Archives" {
        special_use = \Archive
      }
    }

    Notice the auto = no. It didn’t work without it, probably because there is some sort of variable inheritance happening on the inside of dovecot (I’m a dev, not a sys admin really). So you have to explicitly change the value. At least that’s my theory. The Archivefolder is still created sometimes but it can now be deleted inside of SOGo and it stays that way. I’ll update if it’s not the case but it looks like I’m good. Thanks again, @aaronsmith for your kind concern!

    Future readers beware: in case you have any weird behaviors like this, there are 5 folders like this in the dovecot config of Mailcow.

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

aaronsmith
Hi Aaron,
Thanks very much for looking into our problem. We used Sync Jobs (about 80, one for each account) to bring in the emails. The problematic folder did not exist on the original server. It’s not a client problem (I think) because we asked for a 24 hour outage and so no one except myself has used the accounts, even with Webmail.

We have tried SO MANY things, but it always comes back and it is certain that the server is recreating it every time. I don’t know if it’s SOGo or mailcow, but it is happening on every account and I cannot explain it. We’ve also deactivated all the sync jobs, so I don’t think it’s the sync job code either, but perhaps I’m wrong.

I guess we could reparameter every Thunderbird account to use the “Archive” and not “Archives” folder, and then drag and drop all the subfolders, but that’s frankly a huge hassle.

Looking at my other email accounts (Gmail, iCloud) they have “Archive” without the S. Most likely the source email server has an “Archive” folder concept as well, so the synchronization is bringing it over. This thread suggests “Archive” is indeed considered a special folder name:
support.mozilla.org Icon Email Archiving to Local Folder | Thunderbird Support Forum | Mozilla Support

I do see Thunderbird’s documentation suggests it creates the folder with the “S” by default, but I wonder if it’s doing this locally on each device? If so, then it’s intentionally trying to avoid a collision with the “Archive” name typically used by many email providers:
support.mozilla.org Icon Archived Messages | Thunderbird Help

Maybe after the migration completes (and you disable the sync job) you could delete the Archive folder in each mailbox and it won’t come back anymore.

Or try going to the source mail server and delete/disable the “Archive” folder there?

  • dave replied to this.

    aaronsmith
    Thanks, Aaron, for the suggestion. Unfortunately, we have tried many times to delete the folder in an email client and on the server and it always comes back. However, I do believe that this is the problem:

    GitHub Icon mailcow-dockerized/data/conf/dovecot/dovecot.folders.conf at da20d5dc38ef79ca87179080323491a50e9eb222 · mailcow/mailcow-dockerized

    It looks (just guessing) like I would need to undo the line auto = subscribe line for it to stop recreating the folder, at least if I understood correctly the doc:

    Namespaces — Dovecot documentation

    However, I know almost nothing of IMAP, neither of dovecot 😭

    I think I found the solution! You gotta create and modify the file extra.conf as described here:

    docs.mailcow.email Icon Customize/Expand dovecot.conf - mailcow: dockerized documentation

    And then I set it’s contents to the following:

    namespace inbox {
      mailbox "Archive" {
        special_use = \Archive
      }
      mailbox "Archives" {
        special_use = \Archive
      }
    }

    Thus removing the auto = subscribe attribute. It seems to work!

    EDIT: Nope it doesn’t work, false alarm… any dovecot experts out there?

    I was excited until I read to your EDIT. Still, cheers to you for digging to try and find a solution!

    I really think the source mail server has an Archive folder that’s being sync’ed over. Have any accounts finished syncing where you can disable the job then try deleting said folder? I suspect it won’t return after that.

    Your dovecot configuration looks valid, but I’ve not tried what you’re doing 😆

    Wiki has been closed

    • dave replied to this.
      • Ddave

          Moolevel 1
        • Best Answerset by dave

        aaronsmith
        Alright, I got it this time I think. Here’s what needs to be in data/conf/dovecot/extra.conf:

        namespace inbox {
          mailbox "Archive" {
            auto = no
            special_use = \Archive
          }
          mailbox "Archives" {
            special_use = \Archive
          }
        }

        Notice the auto = no. It didn’t work without it, probably because there is some sort of variable inheritance happening on the inside of dovecot (I’m a dev, not a sys admin really). So you have to explicitly change the value. At least that’s my theory. The Archivefolder is still created sometimes but it can now be deleted inside of SOGo and it stays that way. I’ll update if it’s not the case but it looks like I’m good. Thanks again, @aaronsmith for your kind concern!

        Future readers beware: in case you have any weird behaviors like this, there are 5 folders like this in the dovecot config of Mailcow.

        No one is typing