Thunderbird Can’t Create Mailbox Node When Archiving Email Messages

For quite some time, I’ve been getting an error whenever I tried to archive an email message on an IMAP server for the first time during a Thunderbird session (i.e., archiving the first email after starting Thunderbird). All subsequent archiving operations would be error-free until I restarted Thunderbird. (Note: I’m using Thunderbird 3)

After pressing Ctrl+A to archive an email message, Thunderbird’s Activity Manager would contain the following error:

“The current command did not succeed. The mail server for account Account Name: Can’t create mailbox node /path/to/mail/Archive/: File exists.”

Despite much searching, I wasn’t able to find anyone else who encountered this problem when archiving an email message. So, I worked around the problem by just remembering that the first message I archive had to be archived twice, because the first attempt would fail and the message wouldn’t leave the inbox.

Today, I discovered the solution. After setting up a new IMAP account, I didn’t receive any error archiving email messages from this new inbox. However, the Archive folder had a subfolder named 2010. Aha! So, Thunderbird must be trying to create a similar folder in my other account and failing. Well, I don’t need these annual subfolders, so turning off the behavior should take care of the problem.

Fortunately, it is possible to disable the annual folders created by Thunderbird’s archiving feature:

  1. Click on Options in the Tools menu
  2. Click on the Advanced tab icon
  3. Click the Config Editor button (if you receive a facetious warning about voiding your warranty, just accept it)
  4. In the Filter text box, enter granularity
  5. Double-click the preference mail.server.default.archive_granularity and enter the value 0

With the granularity set to zero, Thunderbird won’t create annual subfolders in the archive folder. This finally got rid of the error because the problematic server didn’t allow a mailbox folder to have subfolders.