In wastewater systems, the efficiency of the treatment process is strongly related to the composition of its influent. When the treatment is overloaded (in volume and/or pollutants), its efficiency decreases and the effluent cannot attain the quality required by the receiving waters. This work considers the problem of mixing multiple wastewater streams, with multiple contaminants, into a single stream (the influent) on which various specifications are imposed. The problem has recently been solved by probabilistic methods that can achieve a nearly optimal solution. In this paper, an exact technique is proposed to find the optimal solution with a mixed-integer linear programming solver for the first time. The procedure is applied to a case study with different industrial effluents whose discharges will compose the influent to a treatment plant with constrained capacity (both in volume and pollutant loads). The optimal utility solution achieved describes the discharges that satisfy all constraints. This proposal constitutes an efficient way to manage treatment influents while reducing the computational time required by two orders of magnitude compared to probabilistic methods.