It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The rider should greet the one who is walking, and the one who is walking should greet the one who is sitting, and those who are fewer in number should greet those who are greater in number."
It is narrated from Sayyiduna Abu Hurairah (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: "The younger should greet the elder, the one who is walking should greet the one who is sitting, and the smaller group should greet the larger group."
It is narrated from Abu al-Zinad (may Allah have mercy on him) that when Kharijah bin Zaid bin Thabit wrote greetings, he would write according to the script of Sayyiduna Zaid bin Thabit (may Allah be pleased with him): «السلام عليك يا أمير المومنین» ...... O Commander of the Faithful, peace be upon you, and the mercy and blessings of Allah, His forgiveness, and pure salutations.