Holbrook appeals from an order dismissing his petition for a writ of mandamus to compel the selectmen to issue a building permit for a dwelling on each of two adjoining lots. A brook crosses each lot, parts of which lie within “flood control limits” shown on a subdivision plan. The selectmen refused the permits until Holbrook should construct a retaining *770wall along the brook the entire width of the lots. Holbrook took no appeal (see building code, art. 7, § 40) to the town’s board of appeals. No provision of the zoning by-law or of the building code appears expressly to authorize the selectmen to impose the retaining wall condition. The evidence is reported but there were no findings. Holbrook was properly denied relief by mandamus because of failure to exhaust his administrative remedy (see e.g. Church v. Building Inspector of Natick, 343 Mass. 266, 268-269) by appeal from the selectmen’s action. They are the permit issuing authority under the town’s building code (art. 4, § 1), and act after receiving the building inspector’s written recommendation. See Karl V. Wolsey Co. Inc. v. Building Inspector of Bedford, 324 Mass. 419, 420-422. Cf. Fellsway Realty Corp. v. Building Commn. of Medford, 332 Mass. 471, 472-473. We do not reach the question whether, because mandamus is discretionary (see Village on the Hill, Inc. v. Massachusetts Turnpike Authy. 348 Mass. 107, 119-120, cert. den. 380 U. S. 955), relief could have been denied in any event on the basis of Holbrook’s possible failure to take action under other statutes. See e.g. G. L. c. 131, § 117C, inserted by St. 1965, c. 220, and as amended by St. 1966, c. 276.
Eugene L. Tougas for the petitioner.
John Clark Wheatley for the respondent.
Order dismissing petition affirmed.