Hadith 388
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 389
وَحَدَّثَنِي ، عَنْ مَالِك ، عَنْ
أَبِي النَّضْرِ مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ ، عَنْ
أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ ، أَنَّهُ قَالَ لَهُ :
" أَلَمْ أَرَ صَاحِبَكَ إِذَا دَخَلَ الْمَسْجِدَ يَجْلِسُ قَبْلَ أَنْ يَرْكَعَ " . قَالَ أَبُو النَّضْرِ : يَعْنِي بِذَلِكَ عُمَرَ بْنَ عُبَيْدِ اللَّهِ وَيَعِيبُ ذَلِكَ عَلَيْهِ أَنْ يَجْلِسَ إِذَا دَخَلَ الْمَسْجِدَ قَبْلَ أَنْ يَرْكَعَ . ¤قَالَ يَحْيَى : قَالَ مَالِك : وَذَلِكَ حَسَنٌ وَلَيْسَ بِوَاجِبٍ
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.