FOLEY, HOAG & ELIOT LLP ONE POST OFFICE SQUARE BOSTON, MASSACHUSETTS 02109-2170 TELEPHONE: 617-832-1000 1747 PENNSYLVANIA AVE., N.W. FACSIMILE: 617-832-7000 WASHINGTON, D.C. 20006 http://www.fhe.com TEL: 202-223-1200 FAX: 202-785-6687 July 22, 1999 Ipswich Bancshares, Inc. 23 Market Street Ipswich, Massachusetts 01938 Ladies and Gentlemen: We are familiar with the Registration Statement on Form S-8 (the "S-8 Registration Statement") filed today by Ipswich Bancshares, Inc., a Massachusetts corporation (the "Company"), with the Securities and Exchange Commission under the Securities Act of 1933, as amended. The S-8 Registration Statement relates to the proposed offering by the Company of shares (the "Shares") of its common stock, $.10 par value per share ("Common Stock") issuable pursuant to the following plans (the "Plans"): o 100,000 shares of Common Stock issuable pursuant to the Ipswich Savings Bank 1998 Stock Incentive Plan. o 111,775 shares of Common Stock issuable pursuant to the Ipswich Savings Bank 1996 Stock Incentive Plan. o 11,323 shares of Common Stock issuable pursuant to the Ipswich Savings Bank 1992 Incentive and Nonqualified Stock Incentive Plan. o 23,600 shares of Common Stock issuable pursuant to the Ipswich Savings Bank Deferred Stock Compensation Plan for Directors. In arriving at the opinion expressed below, we have examined and relied on the following documents: 1. The Company's Articles of Organization and By-Laws, each as amended as of the date hereof; 2. Such records of meetings and consents of the Company's Board of Directors and of its stockholders, stock records and other records and documents as we deemed necessary or appropriate for purposes of rendering this opinion; 3. The Plans. Based upon the foregoing, it is our opinion that: 1. The Company has corporate power adequate for the issuance of the Shares in accordance with the S-8 Registration Statement. 2. The Company has taken all necessary corporate action required to authorize the issuance and sale of the Shares. 3. When certificates for the Shares have been duly executed and counter-signed and delivered against due receipt of the purchase price in accordance with the provisions of the Plan, the Shares will be legally issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as an exhibit to the S-8 Registration Statement. Very truly yours, FOLEY, HOAG & ELIOT LLP By: /s/ David W. Walker ---------------------- David W. Walker A Partner