The Messenger of Allah ﷺ said, "Whoever enters this mosque and spits or coughs up phlegm should dig a hole and bury it. If he cannot do that, let him spit into his garment and then take it outside."
قال رسول الله ﷺ: من دخل هذا المسجد فبزق فيه، أو تنخم فليحفر فليدفنه، فإن لم يفعل فليبزق في ثوبه، ثم ليخرج به.
Abu Dawud (477) narrated it from Qanabi, who said, Abu Mawdud narrated to us, from Abdul-Rahman bin Abu Hadrad Aslami, who said, I heard Abu Hurairah, and he mentioned the same. Its isnad is hasan because of Abdul-Rahman bin Abu Hadrad Aslami, about whom Daraqutni said, there is no harm in him, and Ibn Hibban mentioned him among the trustworthy narrators. Ibn Khuzayma also included it in his Sahih (1310) through this same route.As for Abu Mawdud, he is Abdul-Aziz bin Abu Sulayman Hudhali, their freedman. Ahmad, Ibn Main, and Abu Dawud said, he is trustworthy. Ibn Saad said, he was a man of devotion and excellence, and he was a preacher who gave admonitions, and he lived to an old age and died late in life. Ibn Madini and Ibn Numayr said, he is trustworthy. Ibn Hibban mentioned him among the trustworthy narrators. Given all this, he should be at the rank of "trustworthy," but the Hafiz placed him at the rank of "acceptable." I am concerned that this may be an error on the part of the copyists, or a slip of the pen from the Hafiz himself, since he said of the narrator before him, namely Abdul-Aziz bin Abu Salama, "there is no harm in him," even though that narrator ranks below him in reliability.