حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَمُحَمَّدُ بْنُ يَحْيَى، قَالاَ حَدَّثَنَا أَبُو نُعَيْمٍ، حَدَّثَنَا ابْنُ أَبِي غَنِيَّةَ، عَنْ أَبِي الْخَطَّابِ الْهَجَرِيِّ، عَنْ مَحْدُوجٍ الذُّهْلِيِّ، عَنْ جَسْرَةَ، قَالَتْ أَخْبَرَتْنِي أُمُّ سَلَمَةَ، قَالَتْ دَخَلَ رَسُولُ اللَّهِ ـ صلى الله عليه وسلم ـ صَرْحَةَ هَذَا الْمَسْجِدِ فَنَادَى بِأَعْلَى صَوْتِهِ ‏"‏ إِنَّ الْمَسْجِدَ لاَ يَحِلُّ لِجُنُبٍ وَلاَ لِحَائِضٍ ‏"‏ ‏.‏

It was narrated that Jasrah said: "Umm Salamah told me: 'The Messenger of Allah entered the courtyard of this mosque and called out at the top of his voice: 'The mosque is not permissible for anyone who is sexually impure or any woman who is menstruating.''" Translation Not Available

Book Ref: Sunan Ibn Majah Book 1 Hadith 645
Web Ref:  Sunan Ibn Majah Vol 1 Book 1 Hadith 645