Section 109. No resignation of a town or district officer shall be deemed effective unless and until such resignation is filed with the town or district clerk or such later time certain as may be specified in such resignation. Upon receipt of a resignation the clerk shall notify the remaining members, if the resignation is received from a board of two or more members, and he shall further notify the executive officers of the town or district and such notification shall include the effective date of the resignation. Unless otherwise provided by general or special law, ordinance or by-law, a person need not, in order to accept appointment to a public office in a town or district, be a resident of such town or district; provided, however, that if an appointed town or district officer is required to become a resident within a period of time specified at the time of his appointment by the board or officer making the appointment but fails to do so within the time specified, or if an elected or appointed town or district officer removes from the town or district in which he holds his office, he shall be deemed to have vacated his office.