Customs can search all incoming and outgoing USPS mail. The statute says so explicitly, and mentions the USPS directly. I think you might be thinking of state borders.
CBP enforces laws about what physical things can cross the border. CBP doesn't spy on the content of first-class letters, and cannot, without a warrant.
SEC. 344. BORDER SEARCH AUTHORITY FOR CERTAIN CONTRABAND IN OUTBOUND MAIL.
(a) IN GENERAL- The Tariff Act of 1930 is amended by inserting after section 582 the following:
SEC. 583. EXAMINATION OF OUTBOUND MAIL.
(a) EXAMINATION-
(1) IN GENERAL- For purposes of ensuring compliance with the Customs laws of the United States and other laws enforced by the Customs Service, including the provisions of law described in paragraph (2), a Customs officer may, subject to the provisions of this section, stop and search at the border, without a search warrant, mail of domestic origin transmitted for export by the United States Postal Service and foreign mail transiting the United States that is being imported or exported by the United States Postal Service.