The Messenger of Allah ﷺ said, "Whoever visits a fortune-teller," (Musa added in his version, "and believes what he says,") then both narrators agreed, "or approaches a woman," (Musaddad said, "his wife,") "during her menses, or approaches a woman," (Musaddad said, "his wife,") "in her rear, has dissociated himself from what was revealed to Muhammad."
حدثنا موسى بن إسمعيل حدثنا حماد ح و حدثنا مسدد حدثنا يحيى عن حماد بن سلمة عن حكيم الأثرم عن أبي تميمة
أن رسول الله ﷺ قال من أتى كاهنا قال موسى في حديثه فصدقه بما يقول ثم اتفقا أو أتى امرأة قال مسدد امرأته حائضا أو أتى امرأة قال مسدد امرأته في دبرها فقد برئ مما أنزل على محمد
Grading, [hasan]. Tirmidhi narrated it in the Book of Purification, Chapter on What Has Been Said Regarding the Dislike of Approaching a Menstruating Woman, no. 135, from the hadith of Yahya Qattan with this wording, and he mentioned some additional words. Ibn Majah also narrated it, no. 639. Hakeem Athram's narrations are hasan. The hadith has corroborating narrations in Muslim, no. 2230, and Hakim, 8/1, and others.