Does USCIS go by the postmark or the delivery date?
The delivery date. USCIS records the receipt date as the day the package actually arrives at the filing location, so a postmark does not count.
The delivery date. Under 8 CFR 103.2(a)(7)(i), USCIS considers a benefit request received, and records the receipt date, as of the actual date of receipt at the location designated for filing, whether the request is filed electronically or on paper (8 CFR 103.2). A postmark is not the filing date.
What that means in practice
A package mailed on the last day of a deadline arrives after the deadline. If the deadline is a date by which USCIS must receive the filing, a mailed envelope that lands a day or two later has missed it, and USCIS has no obligation to treat the postmark as a substitute. The date that matters is the one on which the lockbox or service center takes the package in, which is the date the receipt notice shows as "received."
The filing date matters for more than deadlines. It fixes the date from which eligibility is measured for many requests, the date an age limit is counted, and for some employment-based cases the date a priority date is established. A request that is rejected, as opposed to denied, keeps no filing date at all, so the clock starts again with the corrected filing (8 CFR 103.2).
A worked case
Take a status that expires on a Friday. A package sent by regular mail on Monday may arrive on Thursday or the following Monday. If it arrives Monday, the receipt date is after expiry no matter what the postmark shows. The same package sent with a tracked courier on Monday and signed for on Tuesday carries a Tuesday receipt date. Readers who must beat a date usually choose a carrier that records delivery and plan for it to arrive days early.
Choose a carrier you can trace
USCIS's filing tips say you may mail through USPS, FedEx, DHL or UPS and encourage you to keep your payment form and the courier tracking number, so you can verify the delivery. It adds that lockboxes cannot accept FedEx packages sent with the "Adult Signature Required" option; "Direct Signature Required" is the option that works for delivery confirmation (USCIS, Tips for Filing Forms by Mail).
The exceptions are in the form instructions
Some filings are governed by a rule that counts differently. A response to a Request for Evidence, an appeal or a motion has its own instructions about where and when to send it, and a notice may set a date by which USCIS must receive the response. Read the instructions on the notice itself. Filing online records the date you submit it, which is why many readers prefer it for tight dates, where the form can be filed online.
What goes wrong
The usual error is counting the postmark as the finish line, or choosing the lockbox address that is slower for your carrier. A package sent to the wrong location may be forwarded or returned, and that takes more days.
This explains how the regulation reads. If a deadline is close and the stakes include your status, talk to an immigration attorney before relying on the mail.