In this work, we investigate the effects of the ghost sector on the dynamical mass generation for the gauge boson of a pure Yang-Mills theory. The generation of a dynamical mass for the gluon is realized by the Schwinger mechanism, which is triggered by the existence of longitudinally coupled massless poles in the fundamental vertices of the theory. The appearance of such poles occurs by purely dynamical reasons and is governed by a set of Bethe-Salpeter equations. In previous studies, only the presence of massless poles in the background-gauge three-gluon vertex was considered. Here, we include the possibility for such poles to appear also in the corresponding ghost-gluon vertex. Then, we solve the resulting Bethe-Salpeter system, which reveals that the contribution associated with the poles of the ghost-gluon vertex is suppressed with respect to those originating from the three-gluon vertex.