From: Rabbi Moshe Sofer
To: Rabbi Yaakov Hertzkes
A rabbi in Banovitz who leveraged governmental authority to secure his position and threatened mesira against community members is rebuked by the Chasam Sofer, who rules that the ban of Rabbeinu Tam against mesira applies with full severity. While the appointment itself is valid under dina d'malchusa dina, the rabbi acted wrongfully and is subject to the penalties of the Geonic takanos. The Chasam Sofer urges the rabbi to repent and the community to reconcile with him upon genuine repentance.
Source: Shu"t Chasam Sofer CM §20