Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Can I list messages that are in one folder and not in another folder?

  • 9 odgovori
  • 1 ima ovaj problem
  • 83 views
  • Posljednji odgovor poslao tomashnyk

more options

I use Thunderbird with Gmail. It has an All Mail folder storing all messages and an Inbox folder storing all incoming messages. One can archive messages by moving them to All Mail from Inbox. Can I somehow list such messages, i.e. messages that are in All Mail but not in Inbox (and not in Sent)? Looking at the search dialogue, I cannot find such option, but maybe I am missing something?

I use Thunderbird with Gmail. It has an All Mail folder storing all messages and an Inbox folder storing all incoming messages. One can archive messages by moving them to All Mail from Inbox. Can I somehow list such messages, i.e. messages that are in All Mail but not in Inbox (and not in Sent)? Looking at the search dialogue, I cannot find such option, but maybe I am missing something?

Izabrano rješenje

Ok, so if I understand it correctly, search that I want to do is impossible, right?

I do not have all mails only in All mail, just some (I had a forwarding set up in the past, then a few years later I decided to use the forwarded account directly, so I removed the folder with forwarded mail in Gmail - Gmail did not delete the e-mails, but put them to All Mail - I weas not sure if I could delete them all because it seemed to me some of that e-mail got lost in the originally forwarded mailbox, so I first wanted to find duplicates with Thunderbird extension and then only delete the e-mails that were not unique).

In the end I used Vivaldi, which would only show in its Archive view e-mails that were only in All mail. Luckily most of them were selectable via a simple search adn the rest could be dealt with manually.

BTW, I do not think ti makes much sense to sort e-mails into folders, that is what search is for: https://wildente.vivaldi.net/e-mail-folders-and-whats-wrong-with-them/

But anyway, what I was after now is solved and if I understand it correctly, Thunderbird was not able to do what I asked.

Pročitajte ovaj odgovor sa objašnjenjem 👍 0

All Replies (9)

more options

My experience with Gmail is that the AllMail folder shows all mail, including what is in inbox. I suggest you define a folder that will contain other than inbox and sent.

more options

Yes, that is what I would like to do. But how do I create that? In search, I do not see an option to search for files in a given folder (I can search a folder, but not for the property of being in the folder, so set operations on folders are impossible - or not?)

more options

My apologies. I miscommunicated my intent. Your message indicates that you place messages in places other than inbox and sent folders. Since AllMail shows all mail, I encourage not using it for the purpose of isolating some messages. To resolve this, it will help to know where the messages would be if not in inbox or sent folder?

more options

The messages I want to display are only in AllMail. They are NOT in any other folder. For some reason, they are only there – they are archived. I want to list these archived messages. I need to display messages that are in folder A (AllMail) AND at the same they they are NOT in any other folder. Is that possible with Thunderbird?

more options

Gmail stores all incoming, outgoing, archived, junk etc - everything is stored in 'All Mail'.

Gmail understands this is totally useless from a user point of view. So gmail invented 'Labels'. So, all incoming mail in the 'All Mail' folder get a 'Inbox' label, so a special filter detects this and shows those emails in the 'Inbox'. In Thunderbird we call the 'Inbox' a folder. All outgoing mail gets a 'Sent' label applied by gmail, so allowing all sent mail to be shown in the 'Sent Mail' imap folder in Thunderbird.

If you choose to 'Archive' then basically all labels get removed and the only place it can now be seen is in that 'All Mail' folder.

Most people do not subscribe to see the 'All Mail' because it is basically a complete duplicate of everything you see in other folders. In your case, it's not quite the same, but that does not mean you cannot fix the situation, so that in the end you can unsubscribe from seeing All Mail.

If you ever used a POP account then it would only access the server Inbox and download the contents. Assuming you had selected the option 'Leave messages on server' then nothing is deleted from server upon download. When you delete emails in a pop account, you cannot put them into the server Trash folder. From a gmail point of view you are just deleting a label, so email gets archived - aka is stored in 'All Mail'. Gmail will only truelly delete emails if they are put into the server/imap Trash folder.

I'm now assuming you have created a new mail account for the existing gmail email address and it is set up as Imap. You will find you can subscribe to see all of gmails 'Labels' /folders.


re :I need to display messages that are in folder A (AllMail) AND at the same they they are NOT in any other folder. Only gmail understands whether a label has been applied or not to an email in the 'All Mail' folder. Thunderbird cannot see any gmail label.

I have no idea how you ended up with virtually all emails being archived, although deleting via a pop account could reproduce the same effect.

Perhaps now is a good point to sort your emails into a system that is more workable/usable and on-going.

If you have an Anti-Virus that is allowed to scan emails or files that get opened, I would strongly advise you switch off scanning of downloaded files at least on a temporary basis and set up Thunderbird profile folder as exempt from scanning. You are about to move a lot of emails and this is a lot of jibber jabber between server and computer, you do not need an Anti-Virus causing any interference.

In Thunderbird you can create and use Message Filters to get copies of selected emails put into folders that are more useful. This may help you get a lot of emails copied into various folders more quickly than manually.

Create folders (Labels in gmail webmail view) so you can organise and store emails and make sure you subscribe to see them.

Example: create a folder called 'Family' Make sure it is subcribed and visible on server - via webmail. It must be allowed imap access. In Thunderbird, make sure it has been set up to be synchronised and set up to download full copies if that is desired.

  • Menu app icon > Account Settings
  • Gmail account - click on 'Synschronisation & Storage' and click on 'Advanced...' button.
  • Make sure the 'Family' folder is selected for download.
  • click on OK

Now create a Filter...

  • Menu app icon > Tools > Message Filters
  • click on 'New'
  • Create a Message Filter called 'Family'
  • choose 'Manually run' & 'Getting New Mail' - Filter before Junk Classification'
  • If more than one family email address - select 'Match any of the following'
  • Select 'From' 'contains' and type family member email address
  • click on the small + sign to add another line and repeat to add another email address

Perform these actions:

  • Select 'Copy Message to' and choose 'Family on gmail account'
  • click on OK

Make sure the filter log is switched on:

  • click on 'Filter Log' button
  • select the 'Enable the Filter log' checkbox.
  • click on 'Close'
  • Make sure 'Family' filter is enabled and selected.
  • At bottom - Run selected filters on Choose 'All Mail on gmail account'
  • Click on 'Run Now'

Allow some time as the 'All Mail' is a large file.

You can use a similar process for 'Friends', 'Organisations', 'Groups', 'Clubs' etc I have a folder called 'Thunderbird' and all emails from this forum get auto diverted into it saving me a lot of time. So that folder only has one email address being sorted into that folder.

You could have other folders called eg: Insurance Docs, Online Orders - so you can copy any email from the 'All Mail' into those folders.


You can perform searches on the 'All Mail' folder. Sometimes sorting by 'From' or 'Subject' can get a batch of emails pre grouped - select them to highlight and use right click 'Copy to' and select suitable imap folder.

Quick Filter Bar also provides a similar search option. But only searches on selected folder. https://support.mozilla.org/en-US/kb/quick-filter-toolbar

Global search can search all folders. Global search provides a different range and you can further filter on initial results - you can choose to specify a person or a specific timeline period. https://support.mozilla.org/en-US/kb/global-search

The other type of search can be set to search specific folders or account. It offers more search options to do with headers. Menu app icon > Find > Search Messages. These search results can be turned into a virtual folder by using 'Save Search' button.

more options

The 'All Mail' folder was never really designed by gmail to be used as a folder because it is so difficult to locate anything and basically massive and unwieldy. It's not really a very helpful way of seeing emails. That's why I'm advising you to get things back on track. Hope the suggestion was helpful advise.

more options

Odabrano rješenje

Ok, so if I understand it correctly, search that I want to do is impossible, right?

I do not have all mails only in All mail, just some (I had a forwarding set up in the past, then a few years later I decided to use the forwarded account directly, so I removed the folder with forwarded mail in Gmail - Gmail did not delete the e-mails, but put them to All Mail - I weas not sure if I could delete them all because it seemed to me some of that e-mail got lost in the originally forwarded mailbox, so I first wanted to find duplicates with Thunderbird extension and then only delete the e-mails that were not unique).

In the end I used Vivaldi, which would only show in its Archive view e-mails that were only in All mail. Luckily most of them were selectable via a simple search adn the rest could be dealt with manually.

BTW, I do not think ti makes much sense to sort e-mails into folders, that is what search is for: https://wildente.vivaldi.net/e-mail-folders-and-whats-wrong-with-them/

But anyway, what I was after now is solved and if I understand it correctly, Thunderbird was not able to do what I asked.

more options

At the link the person says "Sorting mails into folders doesn’t feel like a good use of my time."

Good point, that's why you create Message Filters in Thunderbird to do most of the sorting for you. It will auto move emails into whatever folder you choose.

At link person says "What is the maximum allowable number of emails in a folder before I need a sub folder? Say I am comfortable with at most 50 mails in a folder (this is a lot I guess?), then on average I will need to create a new folder whenever I have received the next 50 emails (that I want to keep). "

If you download mail to an email client and keep everything in one 'folder' then it really depends upon whether you think there is little risk in putting all your eggs in one basket. Clearly, the person at that link thinks there is no or very little risk. They are wrong.

It also has nothing to do with actual number of emails. But I would advise it can be relevant regarding the total size of accumulated emails.

I would not put much faith in the comments made as there is little understanding on the complexities between different servers and how emails are stored. It probably would be best for that person to use webmail.

In Thunderbird emails are downloaded and stored in mbox text files. So the folder you see in folder pane called eg: 'Inbox' is an mbox file in reality. They are not actually stored in folders. I would recommend total mbox file to be kept under 500MB as it means you can easily open those mbox files using a text editor program. The odds on this being a necessity are low, but over years I have helped numerous people to rescue emails because they could open those mbox files. It basically makes sense to ensure access. It is also known that trying to open excessively large text files can use a lot of RAM and even cause a computer crash.

It is also much quicker to open smaller files than a massive file of several GB in size.

Thunderbird also has various search methods including the ability to create search folders which are in reality a virtual search result which is quickly viewable like any folder, so you do not need to repeat the search.

But whilst you can filter messages and use various search methods on just about anything, you cannot say If in Inbox then exclude from All Mail and post result in a search folder. Why, because there is nothing to use as a common denominator. Whilst gmail have applied a 'label' that is only for gmail to use and is only seen in gmail webmail account. The 'label' applied means gmail can offer a virtual view of the email stored in 'All Mail' in any label you apply. It is not included in any actual email header. The 'All Mail' folder has no means of identifying what emails are in the Inbox.

Imap account folders sycnhronise with server 'label' folders and download whatever is in each folder which it stores in mbox text files. So if you have 'Inbox' and 'SentMail' etc and 'All Mail' then unlike gmail webmail - you do have separate copies of the email stored in separate files. But because this is an imap account, you cannot consider the files as truelly independent copies. Yes they are downloaded as full copies and therefore you can back them up independently of the server, but because the imap folders synchronise with server, they can only display whatever is in that 'label/folder' on server.

But the bottom line is this, you can search for specific emails in the 'All Mail' folder. You can store the results as search folders meaning they get auto updated on the fly and are easily updated on what to include in filter via search folder properties. This might be a viable option for you. But you have to search on something tangible. It might be something in header data or a Tag you applied or in an address book or before a date or a specific word etc, but there is no header in any email that says this email has a gmail label called Inbox, so you cannot exclude it.

more options

Maybe in Thunderbird it is not a good idea to have everything in Folder but Vivaldi seems to work fine with it. It stores e-mails as EML messages and while the e-mail database is 3.5 GB, I can open it in vim just fine and it can be reconstructed from the individual EML messages so I am not sure what might go wrong. The e-mails are also backed up on the server - I do not delete e-mails. But I understand people can have different views and that Thunderbirds might have some technical limitations that Vivaldi does not. I used it try to remove duplicates between my various accounts from the time when I was forwarding because it has the feature to find duplicates, but it is not my primary e-mail client.

So I am happy to know that what I wanted was impossible but I dealt with it anyway, see above.