For 1990-2009 cars

Any water that passes the roof seal is drained from the sunroof tray by 2 tubes in the front (1) and 2 tubes in the back (2) of the sunroof module assembly that lead from the corners of the tray to the rocker panels of the vehicle. The tray which acts as a framework for the sunroof assembly, has a water channel that encircles the sunroof opening and directs the water to the drain tubes.

In the graphic below the arrows show the water flow direction in the tray which acts as a framework for the sunroof assembly and drains system.