The Messenger of Allah ﷺ cursed effeminate men and masculine women, and he said, "Expel them from your houses." So the Messenger of Allah ﷺ expelled a certain man, and Umar expelled another.
حدثنا إسماعيل أخبرنا هشام الدستوائي عن يحيى بن أبي كثير عن عكرمة
لعن رسول الله ﷺ المخنثين من الرجال والمترجلات من النساء وقال أخرجوهم من بيوتكم فأخرج رسول الله ﷺ فلانا وأخرج عمر فلانا
Its isnad is sahih. Tirmidhi 3:17 also related it, through Mamar, from Yahya, in abbreviated form, and he said, "Hasan sahih." The commentator also attributed it to Bukhari and Abu Dawud.