The warning of each town meeting, and of each meeting of a city, borough, school district or other public community or of an ecclesiastical society, shall specify the objects for which such meeting is to be held. Notice of a town meeting shall be given by posting, upon a signpost or other exterior place near the office of the town clerk of such town and at such other place or places as may be designated as hereinafter provided, a printed or written warning signed by the selectmen, or a majority of them, and by publishing a like warning in a newspaper published in such town or having a circulation therein, such posting and such publication to be at least five days previous to holding the meeting, including the day that notice is given and any Sunday and any legal holiday which may intervene between such posting and such publication and the day of holding such meeting, but not including the day of holding such meeting; but any town may, at an annual meeting, designate any other place or places, in addition to the signpost or other exterior place, at which such warnings shall be set up. The selectmen shall, on or before the day of such meeting, cause a copy of each such warning to be left with the town clerk, who shall record the same. Notice of a meeting of a city or borough shall be given by posting, upon a signpost or other exterior place nearest to the office of the clerk of such city or borough or at such place or places as may be designated by special charter provision, a written or printed warning signed by the mayor or clerk in the case of a city or by the warden or clerk in the case of a borough, and by publishing a like warning in a newspaper published within the limits of such city or borough, or having a circulation therein, at least five days previous to holding the meeting, including the day that notice is given and any Sunday and any legal holiday which may intervene between such posting and such publication and the day of holding such meeting, but not including the day of holding such meeting.