All doors lock automatically when the lock side is pressed. They unlock when the unlock side is pressed.
Driver's door

Front passenger's door

To lock all the doors from an open front door, press the lock side of the door lock switch and then close the door.
NOTE
When locking the doors this way, be careful not to leave the key inside the vehicle.
Locking, Unlocking with Transmitter
Auto Lock/Unlock FunctionMazda 6 Owners Manual: Side air bag sensor removal/installation
Warning
Handling the side air bag sensor improperly can accidentally
deploy the side air bag module, which may seriously injure you. Read AIR BAG
SYSTEM SERVICE WARNINGS before handling the side air bag sensor. (See
SERVICE WARNINGS.)
1. Turn the ignition switch to LOCK position.
2. ...
Mazda 6 Owners Manual: Front drain hose installation
Caution
If the front drain hose is pinched or bent anywhere, the water in the hose
may not discharge and enter the inside of the vehicle. During and after
installation of the trims and the headliner, always make sure there is no
interference with the front drain hose. Fix any problem if found ...