No person except the governor, a member of the governor's council, a member of the general court, a justice of the supreme judicial, superior or district court, the attorney general, a district attorney, the commissioner, a deputy commissioner of correction, a member of the parole board, or a parole or probation officer may visit any of the correctional institutions of the commonwealth or any jail or house of correction in the commonwealth without the permission of the commissioner or of the superintendent of such institution or of the keeper of such jail or house of correction. Every visitor who is required to obtain such permission shall also make and subscribe a statement under the penalties of perjury stating his true name and residence, whether or not he has been convicted of a felony, and, if visiting an inmate of such institution, his relationship by blood or marriage, if any, to such inmate, and, if not so related, the purpose of the visit.
Mass. Gen. Laws ch. 127, § 36