eBay has agreed to pay $59 million to settle a lawsuit alleging that it assisted in the sale of pill press machines that can be used to manufacture illegal drugs, the US Department of Justice (DOJ) has announced.