What is the ruling on those who make it a habit to shake hands outside the masjid after every obligatory prayer even though they were together before the Salah.

Ustadh AbdulAziz al-Haqqan
It seems to me that this is just giving salam after going out of the masjid, which is fine, rather than linking it to the worship itself.