Ali reported that the Prophet ﷺ was delivering a sermon while mounted on his she-camel, and I was beneath her neck as she chewed her cud, her saliva dripping between my shoulders. I heard him say, "Whoever claims descent from someone other than his father, or attaches himself to people other than his rightful patrons, upon him is the curse of Allah, the angels, and all of mankind. No obligatory deed nor voluntary one will be accepted from him."
أن النبي ﷺ خطب على ناقته وأنا تحت جرانها، وهي تقصع بجرتها وإن لعابها يسيل بين كتفي فسمعته يقول: من ادعى إلى غير أبيه، أو انتمى إلى غير مواليه فعليه لعنة الله والملائكة والناس أجمعين لا يقبل منه صرف ولا عدل.
Tirmidhi (2121) and Nasai (3641) narrated it in a shortened form, both from Qutayba bin Saeed, who said, Abu Awana narrated to us, from Qatada, from Shahr bin Hawshab, from Abdul-Rahman bin Ghanm, from Amr bin Kharija, and he related the hadith in a longer form. Imam Ahmad (17666) and Tabarani in al-Kabir (34) narrated it through another route from Qatada, with the same wording, and the wording given here is theirs.Tirmidhi said, "Ahmad bin Hanbal used to say, I do not concern myself with the hadith of Shahr bin Hawshab. He said, and I asked Muhammad bin Ismail about Shahr bin Hawshab, and he affirmed him as reliable. He said, it is only Ibn Awn who criticizes him, yet Ibn Awn himself narrated from Hilal bin Abu Zaynab, from Shahr bin Hawshab."Then he said, this is a hasan sahih hadith.I say, its chain is hasan, because of the criticism directed at Shahr, though he is otherwise good in his hadith.Something similar has come from Abu Umama, but without mention of the angels' curse. It was recorded by Tirmidhi (2120) and Ahmad (22294). It contains Ismail bin Ayyash, whose hadith from the people of Syria is hasan, and here he narrates from Shurahbil bin Muslim al-Khawlani, who is Syrian.