Our sages, of blessed memory, said [Kiddushin 71a]: When the Holy One, Blessed be He, purifies the tribes, He purifies the tribe of Levi first, as it is said, "And he shall sit as a refiner and purifier of silver; and he shall purify the sons of Levi, and purge them as gold and silver, that they may offer unto the Lord an offering in righteousness" [Malachi 3], and this will be in the time to come. They further expounded: What is "an offering in righteousness"? The Holy One, Blessed be He, performed a charity with Israel, that a family that has become assimilated—remains assimilated. This means those families into which disqualified individuals, such as mamzerim, were mixed due to their wealth and were not identified, and many families of Israel clung to them—the Holy One, Blessed be He, will not separate them from Israel; rather, since they have become assimilated, they remain assimilated. And regarding this they said, money purifies mamzerim, meaning: those mamzerim who, through their money, were mixed into Israel and were not recognized. And so wrote the Rambam, of blessed memory, at the end of his work: In the days of the King Messiah, all of Israel will be genealogically recorded by his word through the holy spirit that will rest upon him, as it is said, "And he shall sit as a refiner and purifier etc.," and he purifies the sons of Levi first and says, "this one is a genealogically fit Kohen" and "this one is a genealogically fit Levi," and he pushes away those who are not genealogically fit to Israel etc., and he only records the genealogy of Israel according to their tribes, informing that this one is from such-and-such tribe and this one is from such-and-such tribe, but he does not say regarding those who are in a presumption of fitness, "this one is a mamzer" and "this one is a slave," for the law is that a family that has become assimilated—remains assimilated. Thus far his words. And it would seemingly appear, since the Rambam wrote this regarding the time to come and not in the laws of forbidden relations, that now this law does not concern us at all, but our teachers did not write so. This is their wording: It is simple to us that there is no difference between this world and the days of the Messiah regarding the commandments at all, and just as we see that Elijah will not reveal the assimilated families even though they will all be revealed before him, so too we are not required to reveal them nor are we permitted to do so [Ran ibid., and so he wrote in the name of our teacher Yonatan HaKohen, see there]. Another of the Rishonim wrote that in this time, when over the length of days the disqualified have mixed with the fit etc., and the sages said every family that has become assimilated remains assimilated, and it is in a presumption of fitness since they did not mix with the disqualified knowingly, and one does not reveal the assimilated families, but one does reveal the disqualified who have not been assimilated and announces them so that the fit may be careful of them; therefore, a person in this time need only be careful of the disqualified who are known to him in his days [Shiltei HaGibborim in the name of the Riaz]. And one who knows of a disqualification is not permitted to reveal it but should leave it in its presumption of fitness, and in the time to come, even though the matter will become known, it will be fit. However, it is possible that it is proper to reveal it to the modest ones so that they do not cling to them, even though if they had clung to them without knowledge there would be no prohibition at all, but because the offspring is not prepared for holiness and purity, as the Holy One, Blessed be He, only rests His Presence upon genealogically fit families in Israel—it is a proper thing to reveal them. And this is what we learn in the Gemara [Kiddushin 71a]: There was yet another family there and the sages did not want to reveal it, but the sages hand them over to their students [Ran ibid.]. And all this is regarding Israel, but Kohanim and Levites will be pushed away from their standing against their will, and regarding them it is said, "and he shall purge them as gold and silver," and if so, regarding a disqualification of Kehunah or Leviyah—one is permitted to reveal it. And one should not ask and say: By what permission will they leave the families in their fitness, for is there not no difference between this world and the days of the Messiah? For it can be said that by the law, each one of the family is permitted as it is like a double doubt, as will be explained in the law of a doubtful disqualification that was mixed into a family, and even though it will be known to Elijah through the holy spirit, behold "it is not in heaven" and we do not judge the laws of the Torah from prophecy and the holy spirit, and since by the law it is permitted, therefore the Holy One, Blessed be He, will have pity on the families mixed with disqualified ones and purify them, except for the tribe of Levi which is prepared for the service of the Beit HaMikdash—that one they shall purify and purge and refine as gold and silver. And one should not raise a difficulty that according to this, how are all these examinations of the woman's generations found, since they are all fit in the time to come, and even now we are not permitted to reveal them? For it can be said that certainly it is so, but nevertheless, when a protest arises against the family, behold it is forbidden by the law until he examines it, and a Kohen certainly should not marry without examination even without a protest, as I wrote in section 12, so that he does not disqualify his offspring in the future, for regarding Kohanim, when they find a disqualification, they will necessarily be separated from their Kehunah as I wrote. And the same applies to a Levi—it is proper to be exacting according to what has been explained. [See Chelkat Mechokek subsection 9 and Beit Shmuel subsection 19, and study it].
אמרו חז"ל [קדושין ע"א.]: כשהקב"ה מטהר שבטים, שבטו של לוי מטהר תחלה שנאמר "וישב מצרף ומטהר כסף וטיהר את בני לוי וזיקק אותם כזהב וככסף והיו לד' מגישי מנחה בצדקה" [מלאכי ג'], וזה יהיה לעתיד לבא. ודרשו עוד: מאי "מגישי מנחה בצדקה"? צדקה עשה הקב"ה עם ישראל שמשפחה שנטמעה – נטמעה. ר"ל אותם משפחות שנתערבו בהם פסולים כמו ממזירים מחמת עושרם ולא נתוודעו ונדבקו בהם הרבה משפחות מישראל – לא יבדילם הקב”ה מישראל, אלא הואיל שנטמעו נטמעו. ולזה אמרו כסף מטהר ממזירים, כלומר: אותם ממזרים שע"י ממונם נתערבו בישראל ולא הוכרו. וכ"כ הרמב"ם ז"ל בסוף חיבורו: בימי המלך המשיח יתייחסו כל ישראל על פיו ברוח הקודש שתנוח עליו שנאמר וישב מצרף ומטהר וגו', ובני לוי מטהר תחלה ואומר זה מיוחס כהן וזה מיוחס לוי ודוחה את שאינן מיוחסין לישראל וכו' ואינו מייחס ישראל אלא לשבטיהן שמודיע שזה משבט פלוני וזה משבט פלוני, אבל אינו אומר על שהן בחזקת כשרות זה ממזר וזה עבד, שהדין הוא שמשפחה שנטמעה – נטמעה. עכ"ל. ומשמע לכאורה מדכתב הרמב"ם את זה על לעתיד לבא ולא בהלכות איסורי ביאה, דעכשיו אינו נוגע כלל לנו דין זה, אבל לא כן כתבו רבותינו, וזה לשונם: ופשיטא לן שאין בין העוה"ז לימות המשיח לענין מצות כלום, וכי היכי דחזינן שאליהו לא יגלה משפחות המטומעין אע"פ שכולן יהיו גלויות לפניו, אף אנו אין עלינו לגלותן ולא רשאין בכך [ר"ן שם, וכ"כ בשם רבינו יונתן הכהן ע"ש]. עוד כתב אחד מן הראשונים שבזמה"ז שלאורך הימים נתערבו הפסולין עם הכשירים וכו', ואמרו חכמים כל משפחה שנטמעה נטמעה, והרי היא בחזקת כשירה הואיל ולא נתערבו בפסולין מדעת ואין מגלין משפחות המטומעות, אבל מגלין הפסולין שלא נטמעו ומכריזין עליהן כדי שיזהרו הכשירים מהם, לפיכך אין לו לאדם ליזהר בזמה"ז אלא מן הפסולים הידועים לו בימיו [ש"ג בשם ריא"ז]. ומי שיודע פסולה אינו רשאי לגלותה אלא יניחנה בחזקת הכשרה, ולעתיד לבא אע"פ שיוודע הדבר תהיה כשרה. ומיהו, אפשר שראוי לגלותה לצנועין כדי שלא ידבקו בהם, אע"פ שאם היו נדבקין בהם בלא ידיעה לא היה שם איסור כלל, אבל מפני שאין הזרע מוכן לקדושה ולטהרה שאין הקב"ה משרה שכינתו אלא על משפחות מיוחסות שבישראל – כשר הדבר לגלותן. והיינו דגרסינן בגמרא [קדושין ע"א]: עוד משפחה אחרת היתה שם ולא רצו חכמים לגלותה אבל חכמים מוסרים אותם לתלמידיהם [ר"ן שם], וכל זה הוא בישראל, אבל כהנים ולוים בע"כ ידחו ממחיצתן, ועליהם נאמר "וזיקק אותם כזהב וככסף", וא"כ בפסול כהונה ולויה – רשאי לגלות. ואין לשאול ולומר: באיזה היתר יניחום המשפחות בכשרותן, והרי אין בין העולם הזה לימות המשיח כלום? די"ל דמדינא כל אחד מן המשפחה מותר דהוא כספק ספיקא כמו שיתבאר בדין ספק פסול שנתערב במשפחה, ואע"ג דאליהו יתוודע לו ברוח הקודש, הלא לא בשמים היא ואין דנין דיני התורה מנבואה ורוה"ק, וכיון דמדינא מותר לכן יחוס הקב”ה על המשפחות המעורבות בפסולים ויטהרם, לבד שבט לוי שהוא מוכן לעבודת בהמ"ק – אותו יטהרו ויזקקו ויצרפו כזהב וככסף. ואין להקשות דלפ"ז כל הנך בדיקות בדורות האשה היכי משכחת לה כיון שכולם כשירים לעתיד לבא, וגם עתה אין אנו רשאין לגלותן? די"ל דודאי כן הוא, אבל מ"מ כשיצא עירעור על המשפחה הרי אסור מן הדין עד שיבדקנה, וכהן ודאי דאין לו לישא בלא בדיקה אף בלא עירעור כמ"ש בסעי' י"ב שלא יקלקל זרעו לעתיד, דבכהנים כשימצאו פסול בהכרח יפרדו מכהונתם כמ"ש. וה"ה לוי – ראוי לדקדק לפי מה שנתבאר. [ע' חמ"ח סק"ט וב"ש סקי"ט ודו"ק].