Sayyiduna Abu Hurayrah (may Allah be pleased with him) said that the Messenger of Allah (peace and blessings be upon him) said: "Whoever hears someone announcing a lost item in the mosque, let him say: 'May Allah not return it to you'; mosques were not built for this."
(b) In the hadith of Ibn Wahb: "May Allah not give it back to you, for mosques are not built for this."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4343
Sulayman bin Buraydah (may Allah have mercy on him) narrated from his father (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) heard a man making an announcement about a red camel, so he (peace and blessings be upon him) said: "May you not find it! Mosques are only for the purpose for which they were built."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4344
Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrated from the Prophet (peace and blessings be upon him): "When you see someone buying or selling in the mosque, say: 'La arbaha Allahu tijarataka' (May Allah not make your trade profitable). And when you see someone announcing a lost item in the mosque, say: 'La raddaha Allahu 'alayka' (May Allah not return it to you)."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4345
Sayyiduna al-Sa'ib bin Yazid (may Allah be pleased with him) said: I was sleeping in the mosque when a man threw a pebble at me. I looked, and it was Umar bin al-Khattab (may Allah be pleased with him). He said: Go and bring those two men to me. I brought them. Umar (may Allah be pleased with him) asked: Where are you two from? They said: From Ta'if. Umar (may Allah be pleased with him) said: If you had been from this city, I would have punished you; you are raising your voices in the mosque of the Prophet (peace and blessings be upon him).
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4346
Amr bin Shu'ayb narrated from his father, from his grandfather (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) forbade reciting poetry in the mosque.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4347
Amr bin Shu'ayb narrated from his father, from his grandfather (may Allah be pleased with him), with something additional: the Prophet (peace and blessings be upon him) forbade announcing a lost item in the mosque, and buying and selling in the mosque.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4348
Sa'id bin al-Musayyib (may Allah have mercy on him) said: Sayyiduna Hassan bin Thabit (may Allah be pleased with him) was reciting poetry in the mosque. Sayyiduna Umar (may Allah be pleased with him) passed by him, looked at him sharply and said: In the mosque? Sayyiduna Hassan bin Thabit (may Allah be pleased with him) said: I used to recite poetry at a time when one better than you was present, meaning the Prophet (peace and blessings be upon him). The narrator said: He (Umar) feared that he would attribute the matter to the Prophet (peace and blessings be upon him), so Sayyiduna Umar (may Allah be pleased with him) allowed him and left him alone.
(b) Sayyiduna Hassan bin Thabit (may Allah be pleased with him) asked the people, among whom was Sayyiduna Abu Hurayrah (may Allah be pleased with him): I adjure you by Allah, did you hear the Messenger of Allah (peace and blessings be upon him) say: "Answer Quraysh on my behalf; may Allah support you with Jibril"?
(c) Imam al-Zuhri (may Allah have mercy on him) said: Reciting poetry the way Sayyiduna Hassan bin Thabit (may Allah be pleased with him) recited it in defence of Islam and the Muslims is permissible in the mosque and everywhere else.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 4349