Abu Hurairah, radhi Allaahu anhu, reported that a man passed by the Prophet, sall'Allaahu alaihi wa salaam, as he was sitting in a group. The man said,
"Peace be upon you."[As Salaamu Alaikum].
The Prophet said,
"He will have [the equivalen of] ten good deeds [for that]. Another man passed by and said, "Peace be upon you, and the mercy of Allaah [As Salaamu Alaikum wa Rahmaatullaahi]."The Prophet said,
"Twenty good deeds."Anothe man passed by and said,
"Peace be upon you, and the mercy of Allaah, and His blessings [As Salaamu Alaikum wa Rahmaatullaahi wa Barakatuhu]."The Prophet said,
"Thirty good deeds."Then, one of those present in the gathering stood up to leave but did not offer greetings. The Prophet of Allaah, sall'Allaahu alaihi wa salaam, said,
"Your friend nearly forgot something. Whenever someone comes into a gathering, let him offer greetings. Then, if he wants to sit, let him sit. When he leaves, let him offer greetings, for the first is no more entitled to greetings than the last."al Bukhaaree, Nasa'i, and Ibn Hibban.