Here is the Junk Mail settings:
Also, junk mails are shown in Smart folders even when the "Message is not in mailbox Junk" condition is set ("Contains messages that match" is set to "all" as well).
Messages are identified as junk by Mail.app (they color is yellow and the icon is shown).
My question is how to make Mail app to hide junk mails in all non-Junk mailboxes.