Sayyiduna Rafi' bin Khadij (may Allah be pleased with him) says: The Messenger of Allah (peace and blessings be upon him) said: "Muslims are bound by those conditions of theirs that lie within what is lawful."
Hadith Referenceالمعجم الكبير للطبراني / باب الراء / 4389