Section 177. No company and no officer, agent or employee thereof, and no duly licensed insurance producer, shall, directly or indirectly, pay or allow or offer or agree to pay or allow compensation or anything of value to any person, excepting an officer of a domestic company acting under section one hundred and sixty-five, for acting in this commonwealth as an insurance producer, as defined in section 162H who is not then duly licensed as an insurance producer. Nothing in this section shall prohibit the payment of additional compensation in the form of referral fees to unlicensed employees of a licensed insurance producer or licensed business entity producer for customers referred to the licensed insurance producer or licensed business entity producer by the unlicensed employees in connection with the purchase of insurance. Nothing in this section shall be deemed to prohibit the payment of a commission or brokerage fee by a special insurance broker to a duly licensed insurance producer in connection with insurance negotiated under the authority of section one hundred and sixty-eight in an insurance company not licensed to transact business in the commonwealth. Nothing in this section shall affect sections one hundred and eighty-two to one hundred and eighty-four, inclusive. Nothing in this section shall prohibit the payment to the holder of a group policy of accident and health insurance issued pursuant to clause (j) of the first sentence of subdivision (A) of section one hundred and ten or of involuntary unemployment insurance issued pursuant to clause (a) of section one hundred and seventeen D or of life insurance issued pursuant to clause (c) of the first paragraph of section one hundred and thirty-three, for which rates are determined pursuant to section one hundred and seventeen C or pursuant to section one hundred and seventeen D, of a service charge; provided, however, that where said holder is offering or enrolling obligors in said group policy without being licensed pursuant to section one hundred and sixty-three, except where no identifiable charge is made to the insured, said holder is deemed to be in the business of insurance solely for the purposes of chapter one hundred and seventy-six D; provided, further, that any action by the commissioner under said chapter one hundred and seventy-six D shall be limited to said holder's activities with respect to said insurance products; and, provided further, that the licensed entity or entities which marketed said insurance products to said holder shall provide training to said holder in the offering of said insurance products and at least annually shall review the activities of said holder to assure that said insurance products are being properly administered. Nothing in the preceding sentence shall permit licensing of insurance agents where it would otherwise be prohibited nor shall anything in the preceding sentence be deemed to limit or restrict any other legal obligations and responsibilities of licensed entities. Nothing in this section shall prohibit the payment of a service charge to the holder of a Class 1 or Class 2 license authorized under the provisions of section fifty-eight of chapter one hundred and forty by a company or its officers, agents or employees authorized to provide insurance protection against the mechanical failure or mechanical breakdown of a motor vehicle or loss of use caused thereby, authorized under the provisions of section fifty-four C. Whoever knowingly violates any provision of this section shall be punished by a fine of not less than $50 nor more than $500.