Another method is three Planar Joints. One for the flush pair of faces in X, one for the flush pair of faces in Y, and one for the flush pair of faces in Z.
It's okay to have more than one Joint between a pair of Components, you just have to acknowledge the pop-up warning and keep going. And, of course, you have to insure you don't create a Joint that conflicts with a prior Joint.
For example... you could make a Planar Joint between the lower face of the extrusion and the corresponding face of the mounting bracket. You could then make another Planar Joint between the inside face of the extrusion and the corresponding face of the mounting bracket. Your third Planar Joint would be between the end face of the extrusion and the corresponding side face of the plate. Of course, that third one will conflict with the other two IF there is any non-square geometry. IF everything is square, then that last Planar Joint will bring the end of the extrusion into a co-planar condition with the side of the plate, but it will fail if the extrusion isn't cut square on the end, or the plate isn't cut square, or the bracket isn't perfectly lined up, or any other set of circumstances exist which prevents all three Joints from coexisting.