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: Rear window glass installation
Caution
To prevent the sealant from cracking or the glass from being
pushed out by air pressure if a door is closed, open all of the windows and
leave them open until the sealant has hardened.
1. Cut away the old sealant using a razor so that 1-2 mm {0.04-0.07 in}
thickness of sealant ...
Mazda 6 Owners Manual: Scheduled Maintenance (Mexico)
Follow Schedule 1 if the vehicle is operated mainly where none of the following
conditions apply.
Repeated short-distance driving
Driving in dusty conditions
Driving with extended use of brakes
Driving in areas where salt or other corrosive materials are used
Driving on rough or muddy ...