It is narrated from Sayyiduna Hakeem bin Hizam that poetry should not be recited in mosques, punishments should not be carried out in them, nor should retaliation (qisas) be taken in them.
Hadith Referenceمسند احمد / مسند المكيين / 15580
Hadith Gradingحکم دارالسلام:إسناده ضعيف لانقطاعه ، زفر بن وثيمة لم يلق حكيم بن حزام