The thermostatic valve (2) in the system is formed as a distribution valve. This valve is fitted in the hot water return line (18) downstream of the heat exchanger (1). A temperature switch (6) senses the temperature of the hot water return line in the region of the thermostatic valve. A third line (3) of the thermostatic valve opens when the temperature is rising and is connected to a bypass (4) which short-circuits the hot water supply line (5).