Whenever we prayed behind the Messenger of Allah ﷺ and one of us gave the salam, he would gesture with his hand to his right and to his left. After he finished the prayer, the Messenger of Allah ﷺ said, "Why does one of you wave his hand as if it were the tail of a stubborn horse? It is enough for one of you," or, "Is it not enough for one of you to do like this?" and he gestured with his finger, "giving the salam to his brother on his right and on his left."
حدثنا عثمان بن أبي شيبة حدثنا يحيى بن زكريا ووكيع عن مسعر عن عبيد الله ابن القبطية
كنا إذا صلينا خلف رسول الله ﷺ فسلم أحدنا أشار بيده من عن يمينه ومن عن يساره فلما صلى قال ما بال أحدكم يومي بيده كأنها أذناب خيل شمس إنما يكفي أحدكم أو ألا يكفي أحدكم أن يقول هكذا وأشار بأصبعه يسلم على أخيه من عن يمينه ومن عن شماله
Reported by Muslim, Prayer, chapter on the command for stillness in prayer and the prohibition of gesturing with the hand, etc., hadith no. 431, from the hadith of Yahya bin Zakariya and Waki, through this same chain. And raising them at the salutation -