I left the mosque with Abu Hurairah when he saw a woman whose perfume was so strong it left a trail like a whirlwind behind her.He said, "Servant of the Compeller, are you coming from the mosque?"She replied, "Yes."He asked, "And did you put on perfume for it?"She answered, "Yes."He said, "Then go back, for I heard Abu Qasim say, 'Allah does not accept the prayer of a woman who has perfumed herself for the mosque,' or 'for this mosque, until she bathes the way she bathes from major ritual impurity.'"
حدثنا عبد الرحمن عن سفيان عن عاصم بن عبيد الله
خرجت مع أبي هريرة من المسجد فرأى امرأة تنضخ طيبا لذيلها إعصار قال يا أمة الجبار من المسجد جئت قالت نعم قال وله تطيبت قالت نعم قال فارجعي فإني سمعت أبا القاسم يقول لا يقبل الله لامرأة صلاة تطيبت للمسجد أو لهذا المسجد حتى تغتسل غسلها من الجنابة
Its isnad is daif because of Asim bin Ubaydullah. It was mentioned previously at 7946 with its isnad and a similar wording, see also 6988. The hadith itself is sahih. It was reported in similar form by Abu Dawud, 4174, in the chapter on grooming, regarding a woman perfuming herself to go out, by way of Sufyan from him, but he narrated another hadith with a sahih isnad immediately after it. Ibn Majah also reported it, 2/1326, no. 4002, in the book of tribulations, on the tribulation of women, as did Abdul-Razzaq, 4/371, no. 8109, all of them narrating from Sufyan from him.