Whoever gives or delivers to a prisoner in any correctional institution or in any jail or house of correction, any drug or article whatever, or has in his possession within the precincts of any prison herein named with intent to give or deliver to any prisoner any such drug or article without the permission of the superintendent or keeper, shall be punished by imprisonment in the state prison for not more than five years, or in a jail or house of correction for not more than two years, or by a fine of not more than one thousand dollars.
Whoever delivers or procures to be delivered, or has in his possession with the intent to deliver, to an inmate confined in any penal institution, or whoever deposits or conceals in or about the institution, or the dependencies thereof, or upon any land appurtenant thereto, or in any boat or vehicle going into the premises belonging to the institution, any article, with the intent that an inmate shall obtain or receive it, and whoever receives from an inmate any article with the intent to convey it out of the institution, contrary to the rules and regulations thereof, and without the knowledge and permission of the Commissioner of Correction or of the superintendent, keeper, Sheriff or other officer in charge thereof shall be punished by a fine of not more than five hundred dollars or by imprisonment in the state prison for not more than three years or in jail for not more than two and one half years.