Change Junk Mail Advanced settings in Mail on Mac
Use Junk Mail Advanced settings in Mail to change the criteria messages must meet to be identified as junk mail, and the actions to take when that happens.
To change these preferences in the Mail app on your Mac, choose Mail > Preferences, click Junk Mail, select the “Perform custom actions” tickbox, then click Advanced.
The name of your custom action.
If “any” or “all” of the following conditions are met
The custom action is applied when a message meets any (even just one) of the listed conditions, or only when it meets all of the conditions.
If you exempted messages from junk mail filtering in the Junk Mail preferences pane, the conditions for those exemptions are listed and “all” appears in the pop-up menu.
To add or remove a condition, click the Add button or the Remove button at the end of a row.
Perform the following actions
Actions to take when a message meets the required conditions.
For example, to create an action, choose Move Message from the first pop-up menu, then choose a mailbox from the second one.
To add or remove an action, click the Add button or the Remove button at the end of a row.