Even where it is permissible to speak negatively for a constructive purpose, one must avoid insincere flattery. It is forbidden to be critical of someone when he is not present, yet demonstrate approval of his behavior in his presence. If the concern is that the person’s feelings not be hurt, then the solution is to express respect and concern for him as a person, but clear disapproval of his behavior.
If one is certain that reproof will be ignored, and is therefore prepared to publicize the person’s behavior as an attempt to induce him to change his ways, one must nevertheless approach the sinner first, so as not to be suspected of insincerity.
In the above case, where it is clear that the person will not be moved by rebuke, one can remove the need for first speaking to him by dispelling any possible suspicions cincerning one’s own sincerity. For example, if one speaks against the perpetrator in public (in the presence of three) rather than speaking to individual members of the community in private, it becomes clear to all that the speaker could not be attempting to gain favor with the perpetrator by showing acceptance of his behavior. Similarly, if the speaker is known to be zealous and outspoken and would not be suspected of flattery, he could resort to private discussion. Also, if it is clear to all that the perpetrator is a difficult personality, and publicly criticizing his behavior could be dangerous, then one may speak against him in private without fear of personal suspicion.
Sefer Chofetz Chaim, 28 Cheshvan, page 164