Spam appearing in Unread folder

I am seeing spam in my unread messages that do not show up in my Junk mail and are marked as Spam. I am using Macmail

I have checked all the settings inc those in Macmail and everything is correct. What maybe the problem?

The Unread smart mailbox is not a built-in feature of Mail. It’s a custom search that you set up. You can choose which mailboxes it draws messages from.

When you say the messages are marked as spam, could you be more specific? Depending on the colors, the messages might have been marked by SpamSieve or something else. What would determine whether you need to train them.

Which mailbox does Mail say that those messages are in?