A rotary machine for sorting a mixture of wastes, the latter being of heterogeneous sizes, shapes and consistencies, the mixture of wastes comprising at least biodegradable wastes and non-biodegradable recyclable wastes, said sorting machine being characterized in that it comprises at least: - one first trommel section, provided with a first separation wall extending over a first axial length and being provided with a first series of separation through orifices (7, 8) allowing separating the mixture of wastes into a first fraction of wastes getting through said first separation wall via the first series of separation orifices (7, 8) and into a residual second fraction of wastes, the mixture of wastes being intended to circulate along said first wall so as to be separated, and - one second trommel section, provided with a second separation wall extending over a second axial length smaller than the first length, said second separation wall being provided with a second series of separation through orifices allowing separating the residual second fraction of wastes into a subfraction of small-sized wastes getting through said second separation wall via said second series of separation orifices and into a residual subfraction of large-sized wastes, the subfraction of large-sized wastes being formed by wastes the size of which is larger than the subfraction of small-sized wastes, the residual second fraction of wastes being intended to circulate along said second wall so as to be separated, characterized in that said second series of separation orifices comprises at least tertiary orifices at least contributing to the separation of the residual second fraction of wastes into the subfraction of small-sized wastes and into the subfraction of large-sized wastes by passage of the subfraction of small-sized wastes throughout said tertiary orifices, the section of said tertiary orifices being oblong-shaped, and said oblong section having a small diameter (Dp), and a large diameter (Dg), the tertiary orifices being distributed in successive rows along the second length, by alternating at least: ∘ a longitudinal row of tertiary orifices, in which the large diameter (Dg) of the tertiary orifices of the straight row is aligned in the direction of the second length, and ∘ a transverse row of tertiary orifices, in which the small diameter (Dp) of the tertiary orifices of the transverse row is aligned in the direction of the second length. - one first trommel section, provided with a first separation wall extending over a first axial length and being provided with a first series of separation through orifices (7, 8) allowing separating the mixture of wastes into a first fraction of wastes getting through said first separation wall via the first series of separation orifices (7, 8) and into a residual second fraction of wastes, the mixture of wastes being intended to circulate along said first wall so as to be separated, and - one second trommel section, provided with a second separation wall extending over a second axial length smaller than the first length, said second separation wall being provided with a second series of separation through orifices allowing separating the residual second fraction of wastes into a subfraction of small-sized wastes getting through said second separation wall via said second series of separation orifices and into a residual subfraction of large-sized wastes, the subfraction of large-sized wastes being formed by wastes the size of which is larger than the subfraction of small-sized wastes, the residual second fraction of wastes being intended to circulate along said second wall so as to be separated, ∘ a longitudinal row of tertiary orifices, in which the large diameter (Dg) of the tertiary orifices of the straight row is aligned in the direction of the second length, and ∘ a transverse row of tertiary orifices, in which the small diameter (Dp) of the tertiary orifices of the transverse row is aligned in the direction of the second length.