Thunderbird and Junk Filtering.

I receive many emails in my Inbox that are shown with a yellow flame icon but these are not automatically sorted into my Junk folder.

If I mark an unmarked message as Junk in my Inbox, it is moved as required but how do I deal with the messages which arrive in my Inbox with the flame already showing?

It is possible that the initial filtering may be coming from my IMAP server settings but these are for Spam not Junk and are set at defaults.

I would like to understand more about what is going on so that I may achieve the required behaviour.

Any advice much appreciated.