Drainage system for horizontally sliding doors or windows, wherein said system comprises: - a fixed transverse element provided with at least a rail adapted to support at least one door or window leaf , at least one channel extending parallel with respect to said rail and at least one tubular duct extending all along the longitudinal extension of said transverse element and having an outer lateral wall and an upper wall defining the bottom of said channel , wherein said upper wall is crossed by at least one drainage opening and said outer lateral wall is crossed by at least one slot , - a drainage tray that can be introduced into said tubular duct through said slot and adapted to extend under said drainage opening , wherein said drainage tray has a front wall adapted to cover said slot and provided with at least one discharge opening and a rear wall opposed with respect to said front wall and adapted to be housed within said tubular duct , characterized in that - said drainage tray comprises a first tray-shaped body provided with said front wall and open on the top and on the rear and a second tray-shaped body provided with said rear wall and open on the top and frontally, wherein said first tray-shaped body and said second tray-shaped body are adapted to be coupled to each other in one of a plurality of different relative positions along a direction (D) perpendicular with respect to said front wall and to said rear wall to adjust the length of said drainage tray as a function of the distance (H) between said slot and said drainage opening measured along a plane perpendicular to the longitudinal development of said tubular duct . - a fixed transverse element provided with at least a rail adapted to support at least one door or window leaf , at least one channel extending parallel with respect to said rail and at least one tubular duct extending all along the longitudinal extension of said transverse element and having an outer lateral wall and an upper wall defining the bottom of said channel , wherein said upper wall is crossed by at least one drainage opening and said outer lateral wall is crossed by at least one slot , - a drainage tray that can be introduced into said tubular duct through said slot and adapted to extend under said drainage opening , wherein said drainage tray has a front wall adapted to cover said slot and provided with at least one discharge opening and a rear wall opposed with respect to said front wall and adapted to be housed within said tubular duct , - said drainage tray comprises a first tray-shaped body provided with said front wall and open on the top and on the rear and a second tray-shaped body provided with said rear wall and open on the top and frontally, wherein said first tray-shaped body and said second tray-shaped body are adapted to be coupled to each other in one of a plurality of different relative positions along a direction (D) perpendicular with respect to said front wall and to said rear wall to adjust the length of said drainage tray as a function of the distance (H) between said slot and said drainage opening measured along a plane perpendicular to the longitudinal development of said tubular duct . <EOS>