We study the effect of the conduction-electron density of states on magnetic transition temperatures in metallic systems with localized magnetic moments. We assume the indirect-exchange interaction to originate from s-f mixing of the Anderson type and we perform calculations of the coupling parameters, up to fourth-nearest neighbors, in the formalism of da Silva and Falicov. The density-of-states models are obtained from a two-component band in tight-binding scheme and we include on-site Coulomb correlation. We find that the magnetic energy has a modulated Ruderman-Kittel-Kasuya-Yoshida-like behavior as a function of the number of conduction electrons n. This is, however, dominated by two strong maxima when n is such that the Fermi level lies on a peak of the density of states. In this condition the transition temperature is enhanced by at least 1 order of magnitude with respect to the weaker background. This behavior is found for different values of the virtual excitation energy of the s-f mixing mechanism.