Amr bin Shu'ayb narrated from his father, from his grandfather (may Allah be pleased with him), that the Prophet (peace and blessings be upon him) forbade reciting poetry in the mosque.