yes. Fastmail can "automatically" do that, if you configure it to have those rules.
I don't ever have to do it with Gmail, and that is a tremendous amount of time saved. It is a lifesaver.
One rule to rule them all.
Gmail’s auto-sorting is extremely simple to look at, but is out of the user’s control, it’s like a secretary handling your letters instead of a predictable system