Muwatta Malik, Book 9, Hadith 61 (USC-MSA)

Yahya related to me from Malik from Abu'nNadr, the mawla of Umar ibn Ubaydullah, that Abu Salama ibn Abd ar-Rahman asked him, "Didn't I see your master sit down before praying after he had entered the mosque?" Abu'n-Nadr said, "By that he meant Umar ibn Ubaydullah, and he was finding fault with him for sitting down before praying after he had come into the mosque." Yahya said that Malik said, "It is good to do that but not obligatory."

وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ أَبِي النَّضْرِ، مَوْلَى عُمَرَ بْنِ عُبَيْدِ اللَّهِ عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، أَنَّهُ قَالَ لَهُ أَلَمْ أَرَ صَاحِبَكَ إِذَا دَخَلَ الْمَسْجِدَ يَجْلِسُ قَبْلَ أَنْ يَرْكَعَ قَالَ أَبُو النَّضْرِ يَعْنِي بِذَلِكَ عُمَرَ بْنَ عُبَيْدِ اللَّهِ وَيَعِيبُ ذَلِكَ عَلَيْهِ أَنْ يَجْلِسَ إِذَا دَخَلَ الْمَسْجِدَ قَبْلَ أَنْ يَرْكَعَ ‏.‏ قَالَ يَحْيَى قَالَ مَالِكٌ وَذَلِكَ حَسَنٌ وَلَيْسَ بِوَاجِبٍ ‏.‏

sunnah.com

also referenced under: Book 9, Hadith 392 (In-Book)