Idris al-Awdi (may Allah have mercy on him) says that Sa'id bin Abi Burdah (may Allah have mercy on him) brought out a letter before us and said: This letter is from Sayyiduna Umar (may Allah be pleased with him) to Sayyiduna Abu Musa al-Ash'ari (may Allah be pleased with him). In it is that all Muslims may testify regarding one another, except one who has been flogged under a prescribed punishment (hadd), one known to have given false testimony, or one suspected regarding his lineage or kinship. What is meant by these is (their state) before repentance. It was said to Sayyiduna Abu Bakrah (may Allah be pleased with him): Repent, and your testimony will be accepted.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20572