UPS and its affiliates have agreed to pay $1.7 million to settle a lawsuit filed by the district attorneys for 45 California counties over mislabeled hazardous waste that was sent to area landfills.