It is narrated from Sayyiduna Ibn Umar (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) forbade a man to depart until his last contact is with the House (the Ka'bah), except menstruating women, to whom the Messenger of Allah (peace and blessings be upon him) granted a concession to depart.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 13403