Ubaydullah bin al-Qibtiyyah narrates that Sayyiduna Jabir bin Samurah (may Allah be pleased with him) said: My father and I went to the Messenger of Allah (peace and blessings be upon him), and he (peace and blessings be upon him) led us in prayer. When he (peace and blessings be upon him) gave the salam, the people gestured with their hands to the right and left. He (peace and blessings be upon him) saw them and said: "What is the matter with you, that you turn your hands about like the tails of unruly horses? When one of you gives the salam, let him give salam to the one on his right and the one on his left." When they prayed with him (peace and blessings be upon him) again, they did not do that.
Hadith Referenceالمعجم الكبير للطبراني / باب الجيم / 1826