There might be something more interesting than a tennis ball in that FedEx package.

File that illicit drug revenue under “miscellaneous.”

That’s more or less the policy the shipping giant FedEx followed starting in the mid-aughts, according to a 15-count indictment filed in U.S. District Court in California on Thursday. According to prosecutors, the company knew the shipping services it provided to two Internet pharmacies ran afoul of the law.

FedEx knew that it was delivering drugs to dealers and addicts,” said a press release from the U.S. Attorney’s Office of the Northern District of California.

The company didn’t just deny the charges — it said that monitoring packages for illegal substances isn’t its job.

In another words: Don’t prosecute the messenger.

“We are a transportation company — we are not law enforcement,” said Patrick Fitzgerald, senior vice president for marketing and communications, in a written statement.

But according to the indictment, the company was interested enough in revenue from shady Internet pharmacies to create bureaucratic workarounds. With an eye toward employee evaluations, salespeople didn’t want the frequent closure of these pharmacies’ FedEx accounts to reflect poorly on their performance.

“I can assure you that these types of accounts will always result in a loss at some point,” said one FedEx employee wary of the Drug Enforcement Administration, according to the indictment. “They have a very short lifespan and will eventually be shut down by the DEA.”

The company’s solution? According to the indictment, a “catchall” category that was not tied to yearly sales goals or specific employees. That way, company representatives could take money from fly-by-night businesses, but not be punished when, well, they flew by night.

FedEx allegedly also proved willing to hold on some pretty unusual packages.

The indictment said employees complained when “trucks had been stopped on the road by Internet pharmacy customers demanding packages of pills; delivery addresses included parking lots, schools, and vacant homes where people would wait for deliveries of drugs; customers would jump on FEDEX trucks and demand Internet pharmacy packages.”

The company’s solution? Its senior vice president of security “approved a procedure whereby Internet pharmacy packages from problematic shippers were held for pick up at specific stations,” according to the indictment.

Problem solved.

Prosecutors said the DEA, Food and Drug Administration and Congress warned FedEx as early as 2004 that it was helping distribute illegal drugs. The government is seeking more than $800 million it said FedEx earned helping dealers — and wants the company to own up to its role in the pharmaceutical black market.

“While DEA is committed to ensuring patients receive legitimate prescriptions, today’s action should send a strong message that corporations that participate in illegal activity risk investigation and prosecution,” said DEA Special Agent in Charge Jay Fitzpatrick in a statement.

FedEx stock was down more than 1.5 percent in after-hours trading. The company is due in court on July 29.