Has it always been totally abandoned or have any shortlines/commuter rail used any parts of it?
The Rigby - Saco and Alfred Road - North Berwick segments were abandoned and torn up in 1945. Biddeford - Saco was kept as an industrial spur and may still have customers.
Kittery - North Berwick was abandoned, torn up and (mostly) re-used for Maine Rt. 236 in 1952.
Hampton - Portsmouth remained in use by the B&M and GTI/PanAm until a couple of years ago; abandonment is in process.
Seabrook - Hampton was torn up in the 1980s. The RoW is owned by NH.
Newburyport - Salisbury was embargoed in 1965. Salisbury - Seabrook was embargoed 1968. There was no further use until both were torn up (with the Amesbury Branch) around 1980. The Newburyport - Salisbury RoW is owned by the MBTA, but most is now a rail-trail.
The Somerville - Newburyport segment is not abandoned, though Ipswich - Newburyport was freght-only from 1976 to the Beverly drawbridge fire (1983?), whereafter it sat unused until passenger service resumed in 1998.
There is presently no freight service north of Salem.