We investigate the generation of magnetic fields from nonlinear effects around recombination. As tight-coupling is gradually lost when approaching z ≃ 1100, the velocity difference between photons and baryons starts to increase, leading to an increasing Compton drag of the photons on the electrons. The protons are then forced to follow the electrons due to the electric field created by the charge displacement; the same field, following Maxwell's laws, eventually induces a magnetic field on cosmological scales. Since scalar perturbations do not generate any magnetic field as they are curl-free, one has to resort to second-order perturbation theory to compute the magnetic field generated by this effect. We reinvestigate this problem numerically using the powerful second-order Boltzmann code SONG. We show that: (i) all previous studies do not have a high enough angular resolution to reach a precise and consistent estimation of the magnetic field spectrum; (ii) the magnetic field is generated up to z ≃ 10; (iii) it is in practice impossible to compute the magnetic field with a Boltzmann code for scales smaller than 1 Mpc. Finally we confirm that for scales of a few Mpc, this magnetic field is of order 2×10-29 G, many orders of magnitude smaller than what is currently observed on intergalactic scales.