Jabir bin Abdullah reported,

A group of people came to Madinah with the Prophet ﷺ at a time when illness was spreading there. The Prophet ﷺ forbade them from leaving until he gave them permission, but they departed without his consent. The Messenger of Allah ﷺ said, "Madinah is like a bellows. It expels its impurities just as a bellows expels the impurities of iron."

Ahmad 15132

Sahih

حدثنا حسين بن محمد حدثنا الفضيل يعني ابن سليمان حدثنا محمد بن أبي يحيى عن الحارث بن أبي يزيد

عن جابر بن عبد الله الأنصاري

أن قوما قدموا المدينة مع النبي ﷺ وبها مرض فنهاهم النبي ﷺ أن يخرجوا حتى يأذن لهم فخرجوا بغير إذنه فقال رسول الله ﷺ إنما المدينة كالكير تنفي الخبث كما ينفي الكير خبث الحديد

أحمد 15132صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Jabir bin Abdullah
Numbering
Darussalam 15132
Ahmad 15132