The rise of email, the recession, and a massive mandate from Congress to pre-fund 75 years of retirement benefits in ten years -- a burden not legally required of any other business or government agency -- has led to difficult times for the United States Postal Service.

The agency, which operates without taxpayer funding, has weathered a drop in letter volume, and has pioneered new programs which may ultimately hold the keys to its future. Now USPS officials have asked federal regulators for permission to expand a deal with Amazon (NASDAQ:AMZN) which has postal carriers and vehicles delivering groceries and other prepackaged goods in big cities. The current arrangement is a test, operating just in San Francisco where the USPS makes early morning deliveries to customers of Amazon's grocery delivery service. 

The potential expanded arrangement would be a two year test which would expand the current setup into more cities. The Post Office requires approval from the Postal Regulatory Commission to enter an arrangement such as this one.

Deals like this are sort of the silver lining to the dark cloud the Internet has brought to the business of mail. People are sending less letters and paying bills online, but the rise of online retailers, including Amazon, has increased the number of packages being sent. It has also created a market for off hours delivery services like the USPS/Amazon arrangement which allows the postal service to take advantage of its existing infrastructure during off-peak hours.

Regular mail trucks are being used in off hours to deliver Amazon's orders. Source: USPS 

How bad are things at the USPS?
The postal service increased its loss in the third quarter to $2 billion from $740 million for the same period last year. The USPS has lost money in 21 of the last 23 quarters, only making money in two quarters where Congress rescheduled retirement benefits the Post Office is obligated to pay, according to a recent press release

That only tells a piece of the story however, as while it reports a loss, the USPS operations from selling postage and delivering mail actually makes money.

"The red ink at USPS has nothing to do with the mail, the Internet, or related factors," explained National Association of Letter Carriers President Fredric Rolando in an email to Fool. "It results from politics. In 2006, a lame-duck Congress mandated that the Postal Service prefund future retiree health benefits. No other public or private entity is required to prefund for even one year; USPS must pre-fund the next 75 years ahead and pay it all over 10 years. That annual charge of $5.6 billion is the red ink."

While the Internet has certainly caused some upheaval for the Post Office, it has also led to opportunity. The USPS deal with Amazon is an attempt to build on the increased demand for package delivery (shipping and package revenue was up 6.6% for the quarter) and to build for the future.  

How big a deal is Amazon grocery delivery for USPS?
The short-term financial impacts are nearly irrelevant. Revenues from the deal are not expected to top $10 million, according to the filing

The money in the short-term is not the point. The deal tests a path which could fundamentally change how the Post Office does business, which is part of the rationale used in the document seeking permission to expand the test.

Customized Delivery will provide the Postal Service a new opportunity to explore the demand for delivery during the 3 a.m. to 7.a.m. window at a specific location at the delivery address, particularly in the ever-growing grocery delivery market. The Postal Service believes these differences to be significant and worthy of testing in the marketplace.

Amazon may ultimately expand its grocery service from a few cities to the entire country which represents a potentially huge opportunity. Of course, the USPS is not limited to delivering groceries or working with Amazon and there are potentially many other online companies which would want to partner for quick, early morning delivery.

Will the Amazon deal work?
Amazon and the USPS are a perfect match. One wants to expand and improve its ability to deliver to customers, while the other has a huge underused capacity for delivering things.

The Post Office needs paying customers, and while Amazon has expressed a willingness to build out its own shipping fleet if it has to, that's not the company's core business. Leveraging a partner for delivery makes more sense and the USPS and online retail in general are natural partners.

Though its current fiscal health is suffering for political rather than operational reasons, the USPS does need to make deals like this one to remain viable in the long term. People won't be going back to letter writing anytime soon, and things like bills and payments will continue to move online. Working with Amazon and growing its package delivery business during off-hours offers the USPS a path for the future.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.