For those who may not be familiar with Shirley:
Shirley is a hamlet (an unincorporated community) in the southeast part of the Town of Brookhaven, in the south-central part of Suffolk County.
Beginning on the north and moving in a clockwise direction, the Hamlet of Shirley in the Town of Brookhaven is bordered on the north by the Hamlet of Yaphank and the Hamlet of Manorville; on the east by the Hamlet of Manorville, the Hamlet of Mastic and the Hamlet of Mastic Beach; on the south by Bellport Bay; and, on the west by the Hamlet of Brookhaven and the Hamlet of Yaphank.
The Hamlet of Shirley has a different border than does the "Shirley, NY 11967" postal zone (i.e., a place can have a "Shirley, NY 11967" mailing address and not be in the Hamlet of Shirley and a place can have other than a "Shirley, NY 11967" mailing address and be in the Hamlet of Shirley): places that have a "Shirley, NY 11967" mailing address that are not in the Hamlet of Shirley are in the Hamlet of Mastic and the Hamlet of Mastic Beach; and, at the same time, there are places in the Hamlet of Shirley with a "Mastic, NY 11950" mailing address.
For a good set of town-by-town maps showing all the villages and hamlets in each of LI's 13 towns (3 in Nassau County and 10 in Suffolk County):
Excellent Long Island Geographic Resource