1. Remove the screws and fastner.
2. Remove the front flap.

3. Install in the reverse order of removal.
Cowl grille removal/installation
Rear flap removal/installationMazda 6 Service Manual: Manual Transaxle Shift Pattern
The shift pattern of the transaxle is conventional, as shown.
Depress the clutch pedal all the way down while shifting; then release it slowly.
Your vehicle is equipped with a device to prevent shifting to R (reverse) by mistake. Push the shift lever downward and shift to R.
...
Mazda 6 Service Manual: Liftgate adjustment
1. Measure the gap and height between the liftgate and the body.
2. If not as specified, loosen the liftgate hinge installation bolts or the
liftgate striker installation screws, and reposition the liftgate.
Clearance
a: 3.0-7.0 mm {0.12-0.28 in}
b: -1.0-3.4 mm {-0.04-013 in}
c: 2.8-5.2 mm ...