A capsule (1) for the preparation of beverages within dispensing machines, has a sealing film (4) which is perforated at the time of the use when the pressurized infusion water is supplied to the capsule and deforms the film (4), bringing it into contact with underlying perforation means (6) fixed to the same capsule. An element (40, 52, 54) for partitioning the capsule volume is provided in order to adapt the capsule to the amount of the actual product.