It is narrated from Sayyiduna Abu Qatadah Ansari (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "When any one of you enters the mosque, he should not sit down until he has prayed two rak‘ahs."
Hadith Referenceموطا امام مالك رواية يحييٰ / كتاب قصر الصلاة في السفر / 388
Hadith Gradingمحدثین:صحيح
Hadith Takhrij«صحيح، وأخرجه البخاري فى «صحيحه» برقم: 444، 1163، ومسلم فى «صحيحه» برقم: 714، وابن خزيمة فى «صحيحه» برقم: 1824، وابن حبان فى «صحيحه» برقم: 2495، 2497، 2498، والنسائي فى «المجتبیٰ» برقم: 731، والنسائي فى «الكبریٰ» برقم: 524، 811، وأبو داود فى «سننه» برقم: 467، والترمذي فى «جامعه» برقم: 316، والدارمي فى «مسنده» برقم: 1433، وابن ماجه فى «سننه» برقم: 1013، والبيهقي فى«سننه الكبير» برقم: 5000، 5001، وأحمد فى «مسنده» برقم: 22959، والحميدي فى «مسنده» برقم: 425، وعبد الرزاق فى «مصنفه» برقم: 1673، وابن أبى شيبة فى «مصنفه» برقم: 3438، شركة الحروف نمبر: 356، فواد عبدالباقي نمبر: 9 - كِتَابُ قَصْرِ الصَّلَاةِ فِي السَّفَرِ-ح: 57»
It is narrated from Abu al-Nadr that Abu Salamah bin Abd al-Rahman said to me: I do not see your companion, that is, Umar bin Ubaidullah, performing the Tahiyyat al-Masjid; when he comes to the mosque, he sits down without having performed two rak'ahs. Abu al-Nadr said that Abu Salamah used to criticize Umar bin Ubaidullah for this matter.
Imam Malik, may Allah have mercy on him, said: Performing Tahiyyat al-Masjid is recommended, not obligatory.
Hadith Referenceموطا امام مالك رواية يحييٰ / كتاب قصر الصلاة في السفر / 389
Hadith Gradingمحدثین:مقطوع صحيح
Hadith Takhrij«مقطوع صحيح، وأخرجه عبد الرزاق فى «مصنفه» برقم: 1674، شركة الحروف نمبر: 357، فواد عبدالباقي نمبر: 9 - كِتَابُ قَصْرِ الصَّلَاةِ فِي السَّفَرِ-ح: 58»