We show that the possible modifications of the spontaneous emission rate for an electric dipole transition, caused by the atomic environment, are constrained by a sum rule expressed as an integral. over the transition frequency. This rule is derived on the basis of causality requirements as expressed in the Kramers-Kronig relation.