A coffee machine includes a filter holder intended to contain at least one coffee dose, a dispensing unit with dispensing nozzles intended to send a flow of hot water on the coffee dose, a water system provided with a pump to supply pressurized water towards the dispensing nozzles, a heater to heat the water to be supplied to the dispensing nozzles, a dispensing valve to enable/disable the supply of hot water towards the dispensing nozzles, and a pre-infusion valve disposed upstream the dispensing valve. The pre-infusion valve is set in such a way as to operate in pulsed mode for a pre-infusion time of at least 4 seconds, with opening and closing time equal to or lower than 1 second.