It is narrated from Sayyiduna Jabir bin Samurah (may Allah be pleased with him): When we prayed behind the Messenger of Allah (peace and blessings be upon him), one of us would give salam to those on his right and left with his hand. When the Messenger of Allah (peace and blessings be upon him) finished the prayer, he said: "What is the matter with you that you gesture with the hand as though they were the tails of restive horses? It is enough for you only" or (he (peace and blessings be upon him) said) "Is it not enough for you that one does like this?" Then he (peace and blessings be upon him) pointed with his blessed finger and said: "Then he gives salam to his brother on his right and on his left."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 2961