The board of health of a town near to or bordering upon an adjoining state may in writing appoint suitable persons, who shall attend at places by which travelers may pass from infected places without the commonwealth, and who may examine such travelers as the board suspects of bringing any infection dangerous to the public health, and, if necessary, restrain them from traveling until licensed thereto by the board of health of the town to which they may come. A traveler coming from an infected place who, without such license, travels within the commonwealth, unless to return by the most direct way to the state whence he came, after he has been cautioned to depart by the persons so appointed, shall forfeit not more than one hundred dollars.
Mass. Gen. Laws ch. 111, § 106