Section 87QQ. The provisions of sections eighty-seven RR to eighty-seven DDD, inclusive, shall not apply to the following:—any person who, acting for himself as owner, lessor, lessee, tenant or mortgagee, shall perform any of the aforesaid acts of a broker or salesman with reference to real estate owned or leased or rented by or to him, or mortgaged to him; the regular employees of any person aforesaid, with respect to such real estate, if such acts are performed in the regular course of, or as an incident to, the management of such real estate and the investment therein; any person, while acting for himself, who seeks to acquire, lease or rent real estate for his own use or investment or his regular employees acting in behalf of such person in the regular course of their employment; a person acting for himself in negotiating a loan secured or to be secured by a mortgage or other encumbrance upon real estate, or his regular employees acting therein in behalf of such person in the regular course of their employment; a managing agent while acting under a contract with the owner of the real estate or the regular employees of such agent acting in his behalf in the regular course of their employment; a person acting as a licensed auctioneer; a person buying, selling or otherwise dealing in any stock, bond or other security, or certificate of beneficial interest in any trust; a public officer or employee while performing his official duties; a person acting as attorney in fact under a duly executed power of attorney from an owner of real estate authorizing the final consummation by performance of any contract for the sale, leasing or exchange of real estate; the services rendered to a client by an attorney at law in the performance of his duties as such; a receiver, trustee in bankruptcy, executor, administrator, guardian or conservator, while acting as such; a person selling real estate under order of any court; a trustee acting under a written instrument of trust, or deed or declaration of trust, or will, or his regular employees, acting in the course of their employment; a bank as defined in section one of chapter one hundred and sixty-seven or organized under the laws of the United States or an insurance company lawfully engaged in business in the commonwealth, or the regular employees of such bank or insurance company acting in the course of their employment, when such bank or insurance company is acting in any aforementioned capacity of a fiduciary or is acting for itself in negotiating a loan secured or to be secured by a mortgage or other encumbrance upon real estate or is acting for itself with reference to real estate owned, mortgaged, leased or rented, by or to it or which it seeks to acquire, lease or rent for its own use; a credit union organized under chapter one hundred and seventy-one or the regular employees thereof acting in the course of their employment.