What is useful for the Trash folders is also great for RSS feeds, for example.
Right-tap the desired folder.
Go to theRetention Policytab.
Make sureUse server defaultsorUse my account settingsare not checked.
Typically, make sureAlways keep starred messagesis checked; this allows for an easy way to preserve emails.
Enter the desired time or message count.
Keeping about 30 days or 900 messages in aTrashfolder usually works fine.
Even for something like your default inbox, 182 days (around 6 months) can work.
Keep in mind that messages you want to keep might inadvertently be deleted with this setting.
SelectPreferences>Account Settingsfrom the Mozilla Thunderbird menu.
For local folders andPOPemail accounts, go to theDisk Spacecategory for the desired account (orLocal Folders).
ForIMAPemail accounts, go to theSynchronization & Storagecategory for the desired account in theAccount Settingswindow.
confirm you checkedDelete all but the most recent __ messagesorDelete messages more than __ days old.
If prompted, selectOKin theConfirm permanent, automatic deletion of messagesdialog.