Hilchos Lashon Hara chapter 10, section 14
But with this leniency you must be very careful to keep all the conditions from the start of the chapter. It is very easy for the yetzer hara (evil inclination) to pull you in, until you become a baal lashon hara (a person who habitually speaks lashon hara). So I will go over them again here in more detail.
The rule: if you know the wrongdoer has not done teshuva (repented), and your goal is to bring about some benefit, you may speak about him if these conditions are met:
1) You must see what happened yourself, and not hear it from others. Even if you were harmed, who says this person did it?
2) Be very careful not to decide right away that it was theft, damage, shaming and the like. First think it through well, according to the Torah, to see whether you are really right and the other person really wrong. This is very hard, because people do not see themselves in a bad light, and think their own actions are correct. If you get this wrong, you are guilty of motzi shem ra (spreading false, harmful stories), which is worse than lashon hara.
3) If you think that talking to the person will help, you must talk to him first.
4) Make sure the story has no lies and no exaggeration. Otherwise it is lashon hara, and you transgress many of the prohibitions listed in the introduction. So it is a great prohibition to leave out any detail that makes the person's wrong seem smaller, even if it does not clear him completely. When listeners hear that detail, he is put down less.
5) Your goal must be to help. This is the main reason for this leniency, as mentioned in paragraph 13.
6) If you can reach the same benefit some other way, without speaking about him, it is forbidden to speak. And if you can tell less of the person's wrong and still get the same benefit, it is a mitzvah to do so, and not reveal the full extent of his wrong.
7) Your words must not cause him more damage than halacha says he deserves if people testified about him before a beis din (Jewish court).