This topic comes in the RULES MAKING in Thunderbird.
You can play with rules making (filters) in Thunderbird as per your requirement. See the example as shown below.
Tools > Message filters
Make sure the 'Filters for' is the correct account.
Click on 'New' button.
Give filter a suitable name.
Apply filters when:
Select: 'Manually run' and 'Getting new mail'
Select: 'Filter before Junk classification' or Filter after Junk classification' as required.
If you have one condition or want all conditions to be True:
select: 'Match all of the following'
If you have two or more conditions and any, but not necessarily all conditions to be true:
select 'Match any of the following'
enter condition such as:
'FROM' and 'IS' and 'the email address'
'SUBJECT' and 'CONTAINS' and 'type the word(s)',
to add another condition click on the small + on the right side.
Perform these actions:
'Move message to' and select the account and folder
click on OK
then make sure the filter is enabled.
note: fiters run from top downwards, so if the first filter has acted and moved an email, the second filter will not pick it up as the email is no longer in the Inbox.
Filters auto run on the Inbox.
You can run them on other folders but only manually.
I would advise you set up the Filter log to work. It is not necessary to have it running, but I have found it useful in the past.
Click on 'filter log'
a 'filter Log' window opens, select 'enable the filter log' option.
click on 'Close'.
The filter will now run each time you get new mail in Inbox.