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:
- Click on Options in the Tools menu
- Click on the Advanced tab icon
- Click the Config Editor button (if you receive a facetious warning about voiding your warranty, just accept it)
- In the Filter text box, enter granularity
- 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.
Just saw on the Official Gmail Blog that IMAP support is being rolled out for free. Now I’ll be able to keep my mail clients synced up from different locations in addition to using the web interface.
The new feature is being rolled out over the next couple of days. Look for the “Forwarding and POP” tab in Settings to change to “Forwarding and POP/IMAP” to know that you’ve got it.
After updating from Mozilla Thunderbird 1.5 to 2.0, I noticed that a manual filter that I had set up stopped working when I clicked the Run Now button. Today, I found a painless and effective workaround for it.
This problem occurs under the following conditions:
- The folder is on an IMAP server
- The mail filter contains one or more rules that match a custom header
- The filter is run manually by selecting “Run Filters on Folder” from the Tools menu or by going to the Message Filters dialog, selecting a folder from the “Run selected filters on” drop down list and then clicking the Run Now button
Note: Filtering on a custom header will work on incoming IMAP mail, just not when run manually on IMAP folders.
The reason the filter fails is that the filter functionality in Thunderbird 2.0 was changed to search the local cache instead of the server and the cache doesn’t contain custom header information, only the standard headers. This change was made because some IMAP servers either don’t have search capability or their implementation is broken.
So, in order to get the filter to work again, Thunderbird needs to have a local copy of all the message headers. Bug 184490, After-the-fact Filters on custom header (eg “User-Agent” or “Newsgroup”) won’t match for IMAP messages, documents this problem and David Bienvenu, in comment #50, gave a very nice workaround for it.
The workaround simply downloads all the messages with all the headers to the local repository for offline use. Hence, Thunderbird can now see all the custom headers and filter on them. To employ the workaround, simply do the following:
- Right-click on the folder you want to filter
- Select Properties
- Click on the Offline tab
- Select the “Select this folder for offline use” checkbox
- Click the Download Now button to make sure your local copy is up to date
- Click the OK button
Now, when you manually run your filter(s), they work! What a relief it was to find this.