It is narrated from Hazrat Abu Hurairah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: "An obligatory prayer is an expiation for the sins committed between it and the next prayer; similarly, one Friday (prayer) is an expiation for the sins committed until the next Friday, and one month (Ramadan) is an expiation for the sins committed until the next month (Ramadan)." After that, he said: "Except for three sins." I understood that the Prophet (peace and blessings be upon him) said this sentence for a specific reason. (In any case! The Prophet, peace and blessings be upon him, said:) Except for associating partners with Allah, breaking a covenant, and abandoning the Sunnah. I asked: O Messenger of Allah! We understand what associating partners with Allah means, but what is meant by breaking a covenant? The 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 to fight him. And abandoning the Sunnah means leaving the community of Muslims."
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 7129
Hadith Gradingحکم دارالسلام:صحيح دون قوله: «إلا من ثلاث ....» إلى آخر الحديث، أخرجه مسلم: 233 مختصرا، وإسناده ضعيف لجهالة الرجل الراوي عن أبى هريرة، كما روى يزيد بن هارون وسيأتي بزيادة رجل مبهم بين عبدالله وبين أبى هريرة، وقال الدارقطني : قول يزيد أشبه بالصواب من قول هشيم .