A worker stuffs newly made toys at the production line of a toys factory in the suburbs of Shanghai October 31, 2008. REUTERS/Nir Elias (CHINA)

You can get anything you want at Harry “Skip” McGrath’s 21st century digital storefront.

Steak rub. Crochet needles. Paella pans. Concealed-carry pistol holsters. Moisturizer.

McGrath was an executive for a Fortune 500 company before his son showed him eBay. The first thing he sold there was a set of 19th century brass candlesticks, the kind his wife would list for $100 at her antiques store. Someone on the Internet bought them for $169.

Eventually the couple ran out of antiques and McGrath started looking into other things to sell. He began buying all kinds of bric-a-brac from wholesalers, becoming a kind of Marco Polo of Internet goods. Some of the items reflect his personal interests. He’s a handgun enthusiast, which is why he deals in a variety of leather holsters. But a lot of what McGrath sells is just what he thinks can be profitable — like remote-controlled boats, which he used to buy from an importer in Long Beach at around $14 and could resell on Amazon for $34.95.

But a couple years ago, people stopped buying McGrath’s toys. He discovered that Chinese merchants were selling the same boats shipped directly from China for a total price of around $18, including postage. He couldn’t compete. Just the mailing cost would put him way past that price.

Though McGrath didn’t realize it at first, he was running into a quirk in an international treaty that makes it possible for an individual to send a pound of stuff from Hong Kong to D.C. for less than it would cost to send the same package from, say, Seattle.

This strange consequence of postal law was less significant when the mail was mostly personal correspondence. But as Chinese companies began logging on to Web marketplaces like eBay, Amazon, and Alibaba, they started taking advantage of the shipping deal to sell directly to American consumers. And so it’s never been easier to get something cheap and Chinese delivered to your door for a startlingly low price: $4.64 for a digital alarm clock; $2.50 for a folding knife; $1.88 for an iPhone cable — all with shipping included.

“I can’t believe our government would do this to undercut American sellers to help the Chinese sell more in America,” McGrath said.

Under this decades-old arrangement, which is overseen by an agency of the United Nations and has participation from nearly every country, national postal services give each other discounted rates on international mail under a certain size and weight.

Here’s how it works. Say someone from Germany wants to sends a letter or package (under 4.4 pounds) to Chicago. The German postal service will handle the Germany-to-U.S. leg. After the package arrives in, say, New York, the USPS takes over, delivering it to its final destination.

Countries used to provide this forwarding service to each other for free, but in 1969 an update to this postal treaty called for small fees (called terminal dues) on each mail piece. Since then the dues have grown, and the payment system has become labyrinthine. In most cases, however, postal services still charge each other less than they would charge their own citizens for moving a package across the country.

According to the terms set out in Universal Postal Union treaty, the USPS in 2014 gets paid no more than about $1.50 for delivering a one-pound package from a foreign carrier, which makes it hard to cover costs. [1] The USPS inspector general’s office estimated that the USPS lost $79 million in fiscal year 2013 delivering this foreign treaty mail. (The Postal Service itself declined to provide specific figures.)

In an effort to ride the e-commerce boom, the Postal Service signed a deal in 2010 with China’s state carrier to sell a special service for small packages entering the U.S. For a small premium, the USPS offered tracking and delivery confirmation, an essential feature for online retailers, as well as expedited shipping.

The Postal Service plainly hoped to grow its Asia presence. One official said in a press release at the time that the arrangement “holds great potential for increasing international package volumes for the Postal Service.” In 2011, the Postal Service announced a similar deal with Hong Kong’s postal carrier. The press release said that the move “solidifies our role as a key supplier in global commerce.” Singapore Post joined in 2012, and Korea Post joined in 2013.

The USPS offers this service, called “ePacket,” to foreign postal operators looking to increase global trade with the United States, spokeswoman Darlene S. Casey said in an e-mail. It has proven popular. Between fiscal years 2011 and 2012, China nearly tripled the number of packages sent under this program, from 9.5 million to 26.8 million. Revenues quadrupled. Casey also noted that the USPS relies on business income, not tax dollars, to fund its operations. (It lost another $5 billion last fiscal year.)

But this has still been a money sink for the Postal Service. In 2012, USPS was paid only 94 cents on average for each piece of Chinese ePacket mail, according to a February report from the Postal Service’s inspector general’s office. That report estimated that the Postal Service was losing about a dollar on each incoming item, adding up to a $29.4 million net loss in 2012.

Forums on eBay are filled with angry notes about ePacket. “I must say that it is simply an economic disaster for US Sellers,” one person wrote. “One product that we sell for 2.00 with 2.50 shipping a chinese company is selling for .99 with free shipping,” another complained. The person added, “Too much work no money here anymore. Let the Chinese have it.”

The benefit of ePacket, though, is that it allows USPS to charge extra for services that are fairly easy to provide thanks to existing infrastructure. The inspector general’s report says that the Postal Service could have lost another $1 million or so in 2012 had Chinese shippers opted for regular mail instead of ePacket.

All of this is little comfort to McGrath, who chafes at the thought of the Postal Service helping Chinese merchants poach his customers. “All of us sellers are selling a lot of Chinese goods in America but at least we’re creating jobs, making money, and adding to the economy,” he said. “But when people buy direct from China that’s adding nothing to the American economy.”

Commercial carriers, who are not party to any of these arrangements, have also found the situation frustrating and potentially anti-competitive. In 2013, a public comment from FedEx noted: “For private competitors like FedEx, U.S. and EU antitrust laws place sharp limits on our ability to coordinate pricing policies with competitors. We expect the U.S. to do everything it can to ensure that the same principles apply to price coordination by post offices.” [2]

At the latest round of negotiations in 2012, countries did agree to raise fees slightly. The United States will get to charge about 13 percent more every year from 2014 to 2017. Under the new terms, the inspector general’s office believes that the USPS will start to lose less money on inbound mail. [3]

All this should be a reminder that any trade deal has winners and losers and unintended consequences. Internet commerce suddenly made the terms of a long-standing mail treaty a competitive advantage for Chinese merchants, and U.S. importers like the McGraths have been feeling the squeeze. But this same system also means that average Americans can get a really sweet deal on an iPhone case shaped like an Absolut bottle.

To insulate his business from foreign competition, McGrath has tried different ways of making his products stand out. He likes to tell people to sell what you’re passionate about, and McGrath loves indoor pistol shooting. Recently he designed his own kind of mattress holster, which hangs a gun and a flashlight from the side of the bed for easy nighttime access. He contracted a company to manufacture the holsters, and they are shipped out in bulk from — where else? — China.

[1] Mainland China, which is still considered a “transitional” country under the treaty, pays a little less.

[2] Commercial carriers are also miffed that this kind of mail is subject to laxer customs regulation. The FedEx comment to the Postal Regulatory Commission has more on these concerns.

[3] The funny fact here is that the USPS actually makes an operating profit on this kind of international mail. (That is, it makes more than the marginal cost, but not necessarily the total cost including infrastructure and other operations.) Whatever it loses on underpriced inbound mail, it recoups through what it charges Americans for outbound mail. In a way, those who mail stuff abroad are helping to pay for other Americans to get cheap shipping on purchases from China.