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: Refrigerant pressure switch inspection
1. Install the SST (gas charging set).
2. Disconnect the refrigerant pressure switch connector.
3. Verify the high-pressure side reading of the SST (manifold gauge)
and continuity between the terminals of the refrigerant pressure switch.
If not as specified, replace the refrigerant pressure ...
Mazda 6 Owners Manual: No.6 windshield fogged
When performing an asterisked (*) troubleshooting inspection, shake the
wiring harness and connectors while doing the inspection to discover whether
poor contact points are the cause of any intermittent malfunctions. If there
is a problem, check to make sure connectors, terminals and wir ...