عَنْ بُريْدَةَ رضِيَ اللّه عَنْهُ أَنَّ رَجُلًا نَشَدَ في المَسْجِدِ فَقَالَ: منْ دَعَا إِلى الجَملِ الأَحْمرَ؟ فَقَالَ رَسُولُ اللّهِ صَلّى اللّهُ عَلَيْهِ وسَلَّم «لا وَجَدتَّ، إِنَّمَا بُنِيَتِ المَسَاجِدُ لِمَا بُنِيَتْ لَهُ» رواه مسلم.
Buraydah (may Allah be pleased with him) reported that a man made an announcement in the mosque, saying: "Who has called out about the red camel?" So the Messenger of Allah (peace and blessings be upon him) said: "May you not find it! The mosques were built only for that for which they were built." Reported by Muslim.
الشرح · explanation
لِما بُنيت له: أي من الصلاة والذكر وتعلّم العلم.
"For that for which they were built": that is, for prayer, remembrance, and learning knowledge.
الدروس · lessons
أنّ المساجد بنيت لذكر اللّه تعالى والصلاة والعلم والمذاكرة في الخير ونحوها. من أراد أن ينشد ضالّة فليخرج خارج المسجد، ولو كتب ورقة وعلقها على الجدار الخارجي للمسجد فلا بأس بذلك.
That mosques were built for the remembrance of Allah the Exalted, prayer, knowledge, discussing what is good, and the like. Whoever wishes to announce a lost item should go outside the mosque; and there is no harm if he writes a note and posts it on the outer wall of the mosque.