Section 26. As used in this section and section forty-two H, “election” shall include every state, city or town primary, preliminary election, election, or town meeting. The registrars, for the purpose of registering voters, shall hold such day and evening sessions as the town, by by-law, or the city, by ordinance, shall prescribe and such other sessions at locations as they deem necessary to allow voters to register and they may for such purposes, use mobile registration units; provided, however, that except as provided in sections thirty-four and fifty, registration for the next election shall take place no later than eight o’clock in the evening on the twentieth day preceding such election and no later than eight o’clock in the evening on the tenth day preceding a special town meeting. Mailed affidavits of registration postmarked before midnight on the final day to register for an election shall be effective for such election, as provided in section forty-two G. If a postmark is unclear or illegible, a mailed affidavit shall be accepted until the fifth day after the final day to register. In any city or town in which the annual city or town election is held on the first Monday in March, in a year when the presidential primary is held, the registration sessions held by the election commissioners or registrars of voters in preparation for the city or town election shall also serve as registration sessions for the primary. If any person applies for registration during a period prior to a regular or special preliminary, primary or election when registration to qualify as a voter in such preliminary, primary or election is prohibited by the provisions of this section, such person, if otherwise qualified, shall be registered and his name shall be placed on the voting lists as a registered voter for all later preliminaries, primaries or elections.