Is this not working for you?
Mail, Preferences, right chevron, Rules, Add Rule, give it a name,
If any of the conditions are met.
Choose Account, and then make your selection.
Perform the following action, Move Message
to mailbox, make your selection.