א"ר יוחנן מאי דכתיב (מלאכי ב, ז) כי שפתי כהן ישמרו דעת ותורה יבקשו מפיהו כי מלאך ה' צבאות הוא אם דומה הרב למלאך ה' יבקשו תורה מפיו ואם לאו אל יבקשו תורה מפיו
Rabbi Yoḥanan said as follows: What is the meaning of that which is written: “For the priest’s lips should keep knowledge, and they should seek Torah at his mouth; for he is a messenger [malakh] of the Lord of hosts” (Malachi 2:7)? This verse teaches: If the teacher is similar to an angel [malakh] of the Lord, then seek Torah from his mouth, but if he is not pure and upright, then do not seek Torah from his mouth; even if he is knowledgeable about Torah, do not learn from him.
וְכֵן הָרַב שֶׁאֵינוֹ הוֹלֵךְ בְּדֶרֶךְ טוֹבָה אַף עַל פִּי שֶׁחָכָם גָּדוֹל הוּא וְכָל הָעָם צְרִיכִין לוֹ אֵין מִתְלַמְּדִין מִמֶּנּוּ עַד שׁוּבוֹ לַמּוּטָב. שֶׁנֶּאֱמַר (מלאכי ב ז) "כִּי שִׂפְתֵי כֹהֵן יִשְׁמְרוּ דַעַת וְתוֹרָה יְבַקְשׁוּ מִפִּיהוּ כִּי מַלְאַךְ ה' צְבָאוֹת הוּא". אָמְרוּ חֲכָמִים אִם הָרַב דּוֹמֶה לְמַלְאַךְ ה' צְבָאוֹת תּוֹרָה יְבַקְּשׁוּ מִפִּיהוּ אִם לָאו אַל יְבַקְּשׁוּ תּוֹרָה מִפִּיהוּ:
Likewise, a Rabbi who does not follow the good way, though he be a great scholar and all of the people stand in need of him no instruction should be received from him until his return to goodness, as it is said: "For the priests' lips should keep knowledge and they should seek the Law at his mouth; for he is the messenger of the Lord of Hosts" (Mal. 2.7). Thereupon the sages said: "If the Rabbi be like unto the messenger of the Lord of Hosts then shall they seek the Law at his mouth, if not, they shall not seek the Law at his mouth."
(ח) הרב שאינו הולך בדרך טובה אע"פ שחכם גדול הוא וכל העם צריכים לו אין למדין ממנו עד שיחזור למוטב:
But one who reads Torah, and learns Mishna, and serves Torah scholars, but his business practices are not done faithfully, and he does not speak pleasantly with other people, what do people say about him? Woe to so-and-so who studied Torah, woe to his father who taught him Torah, woe to his teacher who taught him Torah. So-and-so who studied Torah, see how destructive are his deeds, and how ugly are his ways. About him and others like him the verse states that the gentiles will say: “Men said of them: These are the people of the Lord, yet they had to leave His land” (Ezekiel 36:20). Through their sins and subsequent exile, such people have desecrated the name of God.
ואמר רבי חייא בר אבא אמר רבי יוחנן כל תלמיד חכם שנמצא רבב על בגדו חייב מיתה שנאמר כל משנאי אהבו מות אל תקרי משנאי אלא משניאי
And Rabbi Ḥiyya bar Abba said that Rabbi Yoḥanan said: A Torah scholar on whose clothes a fat stain is found is liable to receive the death penalty, as it is stated: “All those who hate me love death” (Proverbs 8:36), and the Sages said: Do not read: Those who hate me [mesanai]. Rather, read: Those who cause me to be hated [masniai]. Those who cause people to hate the Torah by creating the impression that those who study Torah are unclean deserve the death penalty.
תנו רבנן כל תלמיד חכם המרבה סעודתו בכל מקום סוף מחריב את ביתו ומאלמן את אשתו ומייתם את גוזליו ותלמודו משתכח ממנו ומחלוקות רבות באות עליו ודבריו אינם נשמעים ומחלל שם שמים ושם רבו ושם אביו וגורם שם רע לו ולבניו ולבני בניו עד סוף כל הדורות
The Sages taught: Any Torah scholar who feasts excessively everywhere degrades himself and brings suffering upon himself. He will ultimately destroy his house, widow his wife, orphan his chicks, i.e., his children, and his studies will be forgotten. Much dispute will come upon him, his words will not be heeded, and he will desecrate God’s name and the name of his master and the name of his father. And he will cause a bad name for himself, his children, and his descendants throughout future generations.
וְאָמַרְתִּי אָנִי טוֹבָה חָכְמָה מִגְּבוּרָה וְחָכְמַת הַמִּסְכֵּן בְּזוּיָה, אָמַר רַבִּי יוֹחָנָן וְכִי חָכְמָתוֹ שֶׁל רַבִּי עֲקִיבָא שֶׁהָיָה מִסְכֵּן בְּזוּיָה הָיְתָה, אֶלָּא זֶה זָקֵן שֶׁהוּא יוֹשֵׁב וּמִסְכֵּן בִּדְבָרָיו, כְּגוֹן זָקֵן שֶׁהוּא יוֹשֵׁב וְדוֹרֵשׁ (דברים טז, יט): לֹא תַכִּיר פָּנִים, וְהוּא מַכִּיר. (דברים טז, יט): לֹא תִקַּח שֹׁחַד, וְהוּא לוֹקֵחַ. לֹא תַלְוֶה בְּרִבִּית, וְהוּא מַלְוֶה. שִׁמְשׁוֹן הָלַךְ אַחַר עֵינָיו (שופטים טז, לא): וְהוּא שָׁפַט אֶת יִשְׂרָאֵל עֶשְׂרִים שָׁנָה. גִּדְעוֹן, שֶׁנֶּאֱמַר (שופטים ח, כז): וַיַּעַשׂ אוֹתוֹ גִּדְעוֹן לְאֵפוֹד וגו' וְהוּא שָׁפַט אֶת יִשְׂרָאֵל, הֱוֵי אֵין מִסְכֵּן אֶלָּא מִי שֶׁמַּסְכִּין דְּבָרָיו.