No accessory buildings designed, intended or used for community facility purposes shall extend closer than 25 feet to any side or rear lot line of any residential lot used wholly for residential purposes, nor closer than 25 feet to any residential district boundary, nor closer than 10 feet to any side or rear lot line wholly within any commercial zoning district. Accessory buildings lying wholly to the rear of the principal buildings shall not extend closer than 10 feet to the side or rear lot line, provided these lines do not designate a residential district boundary or are in common with a lot used wholly for residential purposes.