The sunshade can be opened and closed by hand.
The sunshade opens automatically when the moonroof is opened, but must be closed by hand.

CAUTION
Jam-safe Moonroof
Security SystemMazda 6 Owners Manual: Windshield Defrosting and Defogging
Press the windshield defroster switch. In this position, the outside air position
is automatically selected, and the air conditioner automatically turns on. The air
conditioner will directly dehumidify the air to the front windshield and side windows.
Airflow amount will be increased.
WARNING
...
Mazda 6 Owners Manual: Rear drain hose removal
1. Remove the headliner.
2. Remove the trunk side trim. (4SD)
3. Remove the trunk side upper trim and trunk side trim. (5HB)
4. Disconnect the rear drain hose from the sunroof frame.
5. Remove the rear drain hose from the clips.
6. Pull the rear drain hose into the room side.
7. Remove the rea ...