Section 18. (a) The attorney general or district attorney may prosecute any person committing a violation of this chapter. A person convicted of committing a violation of this chapter shall be punished for a first offense by a fine of not more than $1,000 or by imprisonment in a jail or house of correction for not more than 6 months, or by both such fine and imprisonment, and, for a second or subsequent offense, by a fine of not more than $5,000 or by imprisonment in a jail or house of correction for not more than 1 year, or by both such fine and imprisonment. The attorney general or district attorney may file a petition for injunctive relief against any person who violates this chapter. If the attorney general, district attorney or the state secretary has cause to believe that, as a result of official misconduct, a person holding the office of notary public is unsuitable to hold that office, the attorney general, district attorney or state secretary shall provide notice to the governor of such official misconduct. Any conviction based on a violation of this chapter shall be grounds for the revocation of a notary public's appointment. If the court finds that a person so convicted either knew or should have known that the conduct would be in violation of this chapter, the court may require such person to pay a civil penalty of not more than $5,000 for each such violation and may also require the person to pay the reasonable costs of investigation and litigation of the violation, including reasonable attorneys' fees.
(b) A person having an interest or right that is or may be adversely affected by a violation of section 17 may initiate an action for private remedies and, if the attorney general or district attorney has not done so, for injunctive relief. Such person may be awarded actual damages and, if the court finds that the person against whom the action is brought either knew or should have known the conduct would be in violation of said section 17, punitive damages of not more than $5,000 per violation, attorneys' fees and court costs.
(c) A violation of section 17 shall constitute an unfair or deceptive act or practice pursuant to chapter 93A.
(d) It shall not be a defense in an action pursuant to this section that the conduct that is the subject of the action, in whole or in part, occurred primarily or substantially outside the commonwealth.