A measurement of the CP asymmetries Sf and Sf¯ in B0 → D∓π± decays is reported. The decays are reconstructed in a dataset collected with the LHCb experiment in proton-proton collisions at centre-of-mass energies of 7 and 8 TeV and corresponding to an integrated luminosity of 3.0 fb−1. The CP asymmetries are measured to be Sf = 0.058 ± 0.020(stat) ± 0.011(syst) and Sf¯=0.038±0.020(stat)±0.007(syst). These results are in agreement with, and more precise than, previous determinations. They are used to constrain angles of the unitarity triangle, | sin (2β + γ) | and γ, to intervals that are consistent with the current world-average values.[Figure not available: see fulltext.].