It is narrated from Hazrat Abu Hurairah (may Allah be pleased with him) that the Noble Prophet (peace and blessings be upon him) said: One obligatory prayer is an expiation for the sins committed until the next prayer, likewise one Friday (prayer) until the next Friday, and one month (Ramadan) until the next month (Ramadan) is also an expiation for the sins committed in between. After that, he said: Except for three sins. I understood that the Noble Prophet (peace and blessings be upon him) said this sentence for a specific reason. (In any case! The Noble Prophet (peace and blessings be upon him) said:) Except for associating partners with Allah, breaking a covenant, and abandoning the Sunnah. I said: O Messenger of Allah (peace and blessings be upon him), we understand what associating partners with Allah means, but what is meant by breaking a covenant? The Noble Prophet (peace and blessings be upon him) said: Breaking a covenant means that you pledge allegiance to someone, then you prepare to oppose him and take up the sword and start fighting against him. And abandoning the Sunnah means leaving the community of Muslims.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10576
Hadith Gradingحکم دارالسلام:صحيح دون قوله: «إلا من ثلاث» ، م: 233، وإسناده ضعيف لجهالة الرجل الأنصاري الراوي عن أبى هريرة