MozillaZine

Maildir users: do "Saved Search" folders remain for you?

User Help for Mozilla Thunderbird
dinoroar
 
Posts: 5
Joined: November 18th, 2019, 8:52 pm

Post Posted January 8th, 2020, 3:17 am

Over the course of many years/versions of Thunderbird... I've tried using saved search folders on accounts that are using Maildir storage on the filesystem, and they've never stuck for me.

I can create the saved search folders initially. But after restarting Thunderbird, they always disappear.

Wondering if anyone out there who happens to use Maildir has managed to get them working reliably?

tanstaafl
Moderator

User avatar
 
Posts: 46338
Joined: July 30th, 2003, 5:06 pm

Post Posted January 8th, 2020, 6:21 am

I haven't had that problem. I've been using it with a IMAP account. I'm currently using version 68.3.1.

How does it fail? Does the saved search folder silently disappear or does the saved search folder remain but have a empty folder listing?

What version does help -> troubleshooting information say you are using?

I suggest you try deleting the "virtualFolders.dat" file in your profile, and restart. It should create a blank replacement file. Add the saved search folder again and re-test to see if the problem still occurs.

That file stores the saved search settings and might have gotten corrupted. I'm used to seeing this for threads about problems with unified folders (which use saved searches plus a special mail view).

dinoroar
 
Posts: 5
Joined: November 18th, 2019, 8:52 pm

Post Posted January 9th, 2020, 4:47 am

How does it fail? Does the saved search folder silently disappear or does the saved search folder remain but have a empty folder listing?


The 'saved search' folder just silently disappears altogether. Both from the folders pane, and the virtualFolders.dat file contents.

What version does help -> troubleshooting information say you are using?


Currently I'm on Windows 10 (64bit) and running Thunderbird 68.3.1 (32-bit) - which the 'About' Windows says is up to date currently.

I suggest you try deleting the "virtualFolders.dat" file in your profile, and restart.


Thanks for the tip! I might be making some progress now. I've been doing some experimenting...

So here's the order of what happens:

- While Thunderbird is running, I create a 'saved search' folder - it saves the definition to the virtualFolders.dat file, and works perfectly well during this same session.
- I close Thunderbird (and confirm the process has fully ended) - virtualFolders.dat remains the same with the working definition(s) that I created (checksum hasn't changed).
- I run Thunderbird again, and Thunderbird replaces my virtualFolders.dat with a new file containing only one rule (which I never created myself)...

Code: Select all
version=1
uri=mailbox://nobody@smart%20mailboxes/Trash
searchFolderFlag=100
scope=mailbox://nobody@Local%20Folders/Trash
terms=ALL
searchOnline=true


...in past times when my Trash folder contained sub-folders (i.e. when I have recently deleted whole folders), all those Trashed-sub-folders are also listed in this auto-created definition. And oddly enough, even when the Trash is totally emptied, when I redo the cycle above, those long-ago-purged folders are still listed again and again in the newly overwritten virtualFolders.dat ... they seem to stick around for many restarts, but eventually it just goes back to the shorter file content above.

Also sometimes my definition(s) survive one restart, but they're always gone after 2-3 restarts at most. And during these restarts I'm not doing anything in Thunderbird aside from opening it and checking if my saved search folder has disappeared.

I've disabled all my extensions - makes no difference.

Also tried many times doing things like deleting the whole virtualFolders.dat file + emptying it and either setting or not setting the file to readonly... whatever I do, as soon as Thunderbird gets the chance to overwrite the file again (regardless of previous state), it just overwrites it with that code sample above.

I've taken a look at the virtualFolders.dat file in my other Thunderbird profiles which work fine (mbox or maildir+imap)... they don't seem to contain the text "nobody" or "Trash" anywhere.

So maybe it's just an issue with one profile? Although I thought I could remember it happening in other profiles too. This is a POP+Maildir profile.

tanstaafl
Moderator

User avatar
 
Posts: 46338
Joined: July 30th, 2003, 5:06 pm

Post Posted January 9th, 2020, 10:47 am

Weird.

I looked at my virtualfolders.dat and noticed I don't have a line with searchFolderFlag. Based on https://dxr.mozilla.org/comm-central/so ... r.cpp#3108

Code: Select all
if (!vfFolderFlag.IsEmpty())
              WriteLineToOutputStream(SEARCH_FOLDER_FLAG"=", vfFolderFlag.get(), outStream);

we have different values for vfFolderFlag. If you delete virtualfodlers.dat, and add a saved search folder do you have a searchFolderFlag entry in it?

Is view -> folders set to all?

You could try playing with the attributes or security requirements (in its file properties) for virtualfodlers.dat to try to prevent Thunderbird from modifying it. If it tried and fails, it might post a error message that would helps identify why its trying to modify it.

dinoroar
 
Posts: 5
Joined: November 18th, 2019, 8:52 pm

Post Posted January 10th, 2020, 8:05 am

If you delete virtualfodlers.dat, and add a saved search folder do you have a searchFolderFlag entry in it?


No, there's no "searchFolderFlag" line for the new search folders that I create.

The "searchFolderFlag" line only appears in this mysterious "uri=mailbox://nobody@smart%20mailboxes/Trash" entry that keeps getting automatically created on its own.

Is view -> folders set to all?


Yes

You could try playing with the attributes or security requirements (in its file properties) for virtualfodlers.dat to try to prevent Thunderbird from modifying it. If it tried and fails, it might post a error message that would helps identify why its trying to modify it.


When I set virtualFolders.dat to read-only, and restart Thunderbird a few times, I don't see any errors pop up. Or do I need to look in a logging/console window somewhere or something?

tanstaafl
Moderator

User avatar
 
Posts: 46338
Joined: July 30th, 2003, 5:06 pm

Post Posted January 10th, 2020, 9:22 am

dinoroar wrote:When I set virtualFolders.dat to read-only, and restart Thunderbird a few times, I don't see any errors pop up. Or do I need to look in a logging/console window somewhere or something?

The idea was to do that to prevent it mucking with your search folders. You could look in tools -> developer tools -> error console to see what errors occur if you want to continue to try to identity why it was trying to muck with your search folders. But I wouldn't bother, there are normally lots of errors and warnings recorded there that can be safely ignored, and its possible the problem might go away with the next major version of Thunderbird.

dinoroar
 
Posts: 5
Joined: November 18th, 2019, 8:52 pm

Post Posted January 10th, 2020, 8:10 pm

tools -> developer tools -> error


Checked there, nothing relevant unfortunately.

The idea was to do that to prevent it mucking with your search folders.


Yeah, it's a good work around, so I'll just do this for now.

Thanks for all your advice, I really appreciate it!

Return to Thunderbird Support


Who is online

Users browsing this forum: No registered users and 5 guests