They were the earliest, really, searching mail first to find information about birth control being shared and pornography (Comstock Act, 1873), then sedition. I assume that all of the first precedents for mass surveillance and data collection come from the USPS.
https://en.wikipedia.org/wiki/Comstock_laws