is salam to be recited in masjid
If your question is about the greeting of Salam then it should be said in a Masjid if people are not engaged in their individual or collective worships. If people are not engaged in their individual or collective forms of worship then Salam should be said either to all the people or one by one.
If your question is about sending Salam upon the Holy Prophet Sallallahu Alaihe Wa Sallam then it is not only permissible but it is considered a pure form of worship. However, if there are others engaged in their individual worships then Salam should also be recited quietly.
And Allah knows best.
Mufti Ikram ul Haq
Fatwa Center of America