Abu Abd al-Rahman al-Sulami (may Allah have mercy on him) said: I heard Sayyiduna Ali (may Allah be pleased with him) delivering a sermon. After praising and glorifying Allah, he said: O people! Whichever male or female slave commits adultery, apply the prescribed punishment to them; if he is married, flog him. A maidservant of the Prophet (peace and blessings be upon him) had committed adultery, and he (peace and blessings be upon him) sent me to apply the punishment. I found her in the state of postnatal bleeding, and I feared that if I struck her she would die. So I left her at that time, and when she recovered I struck her. The Prophet (peace and blessings be upon him) said: "You did well."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17004
Sayyiduna Ali (may Allah be pleased with him) said that a slave girl of the Prophet (peace and blessings be upon him) gave birth as a result of adultery and was in postnatal bleeding, and he (peace and blessings be upon him) sent me to apply the prescribed punishment to her. I found her in the state of postnatal bleeding, so I came and told the Prophet (peace and blessings be upon him), and he (peace and blessings be upon him) said: "When she is free of the postnatal bleeding, then apply the punishment." And he said: "Establish the prescribed punishments upon your slaves as well."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الحدود / 17005