Sayyiduna Ali bin Abi Talib (may Allah be pleased with him) narrates: I entered the mosque, and the Prophet (peace and blessings be upon him) was there with some of his Companions. I said: "As-salamu alaykum." The Prophet (peace and blessings be upon him) said: "Wa alaykum as-salam wa rahmatullah; I will receive twenty good deeds and you will receive ten." Sayyiduna Ali (may Allah be pleased with him) narrates: I entered a second time and said: "As-salamu alaykum wa rahmatullah." The Prophet (peace and blessings be upon him) said: "Wa alayka as-salam wa rahmatullahi wa barakatuh; I will receive thirty good deeds and you will receive twenty." I entered a third time and said: "As-salamu alaykum wa rahmatullahi wa barakatuh." The Prophet (peace and blessings be upon him) said: "Wa alayka as-salam wa rahmatullahi wa barakatuh; I will receive thirty good deeds and you will also receive thirty good deeds. O Ali! You and I have become equal with regard to the greeting. O Ali! Any Muslim who passes by a gathering and greets those people with salam, Allah Almighty grants him ten good deeds, erases ten of his sins and raises him ten ranks."
Al-Bazzar recorded it. Its chain contains a narrator, Mukhtar bin Nafi' al-Taymi, who is da'if (weak). Its chain also contains a narrator, Ubayd bin Ishaq al-Attar, who is matruk (abandoned).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الأدب / 12735