אמר רבי יוחנן, מאי דכתיב +מלאכי ב'+ כי שפתי כהן ישמרו דעת ותורה יבקשו מפיהו כי מלאך ה' צבאות הוא אם דומה הרב למלאך ה' - יבקשו תורה מפיו. ואם לאו - אל יבקשו תורה מפיו
Rabbi Yohanan said: What is meant by (Malachi 2:7) "For the lips of the priest guard knowledge, and they shall seek Torah from his mouth, for he is a messenger/angel of the Lord of Hosts"? If the rabbi is angelic--seek Torah from his mouth. If not--do not seek Torah from his mouth.Several years ago, I wrote about why it's a dangerous passage; after all, angels are lousy role models.
But every once in a while, a delicious irony presents itself. The most recent case (HT: FailedMessiah) of a rabbi being charged with sexual abuse involves the scion of a little known-offshoot of Chabad and ally of Satmar called "The Malochim." So we can now go completely against that Gemara and say, "If the rabbi is like a malach, stay far the heck away."
Another talmudic passage that I would advise against on similar grounds appears in Brakhot 28b:
מנעו בניכם מן ההגיון והושיבום בין ברכי תלמידי חכמיםKeep your sons away from logic, and seat them between the knees of Torah scholars.
That can actually be the motto of certain yeshivas.