Praise be to Allah.
Al-Tirmidhi narrated in al-Sunan (5/56) from ‘Abd-Allaah ibn ‘Amr that the Messenger of Allaah (peace and blessings of Allaah 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-Albaani said: (it is) hasan.
The words of the Prophet (peace and blessings of Allaah 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 salaam (peace), which is the way of Adam and his descendents among the Prophets and awliyaa’ (close friends of Allaah). Al-Nasaa’i reported with a jayyid isnaad from Jaabir, attributing it to the Prophet (peace and blessings of Allaah 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 Allaah 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-salaamu ‘alaykum”). See: al-Lama’ by al-Turkmaani, 1/285, 282.
And Allaah knows best.