The following steps will allow you to create a new folder for spam messages, and have Thunderbird move any messages containing X-Spam-Flag: YES into that folder.
Launch Thunderbird. Click File -> New -> Folder.
Name the folder as you wish and click OK.
Click Tools -> Message Filters.
Click ‘New’ to add a new filter.
Give the filter a descriptive name and click ‘Match any of the following’.
Select ‘Customize’ from the top left drop-down menu.
Enter ‘X-Spam-Flag’ (without the quotes), click Add, and then click OK.
Type ‘YES’ (all caps, no spaces) in the top right box.
It should read: X-Spam-Flag / contains / YES.
Under ‘Perform these actions’, select ‘Move Message to’ and then select the new folder you created. Click OK.
Ensure the new rule is Enabled.
You can also optionally run the filter on your mail folders right now.
24/7/365 support line:
Toll-free 877-ZEROLAG (937-6524)
Sales and corporate office:
818-864-4549 (8 AM - 5 PM Pacific)
289 S. Robertson Blvd, Box 441
Beverly Hills, CA 90211