Protecting pulp and paper mills from corrosion