Praise be to Allah.
Al-Tirmidhi narrated in al-Sunan (5/56) from ‘Abd-Allah ibn ‘Amr that the Messenger of Allah (peace and blessings of Allah be upon him) said: “He is not one of us who imitates others. Do not imitate the Jews or the Christians, for the greeting of the Jews is a gesture with the fingers and the greeting of the Christians is a gesture with the hand.” Al-Albani said: (it is) hasan.
The words of the Prophet (peace and blessings of Allah be upon him) “he is not one of us” means he is not one of those who follow the same path as us and pay attention to doing things our way. “Who imitates others” means, he imitates those who are not of our religion. The meaning is: do not imitate them at all in any of their deeds, especially in these two characteristics. They would only give or return a greeting by means of a gesture, without speaking the words of salam (peace), which is the way of Adam and his descendents among the Prophets and awliyaa’ (close friends of Allah). Al-Nasaa’i reported with a jayyid isnaad from Jaabir, attributing it to the Prophet (peace and blessings of Allah be upon him): “do not give the greeting of the Jews, for they greet by means of a gesture of the head and hand.” Note: al-Nawawi said: this (the hadeeth of Jaabir) does not contradict the hadeeth of Asmaa’ bint Yazeed: the Prophet (peace and blessings of Allah be upon him) passed through the mosque where a group of women were sitting, and he greeted them with a wave of his hand. This hadeeth is to be interpreted as meaning that he greeted them with both a gesture and the words of greeting. Abu Dawood also reported this hadeeth from her, saying, “and he greeted us.” The prohibition on greeting with a gesture only is limited to those who are able – both physically and within the limits of sharee’ah – to speak the words of greeting. Otherwise it is permissible for the one who is doing something that prevents him from speaking to respond to a greeting with a gesture – such as when one is praying, or when one is far away; it is also permissible to use gestures if one is unable to speak (“dumb”), or when greeting the deaf.
Greeting with a gesture and without speaking is an imitation of the Jews or Christians. The same applies to many military salutes. The scholars have stated that it is bid’ah to greet with a gesture and without saying the words of greeting (i.e., “al-salamu ‘alaykum”). See: al-Lama’ by al-Turkmaani, 1/285, 282.
And Allah knows best.