Amazon.com and the U.S. Postal Service have struck a deal to allow the post office to continue delivering packages.