A process for preparing rigid polyurethane foams or rigid polyisocyanurate foams comprising the reaction of A) at least one polyisocyanate, B) at least one polyetherester polyol obtainable by esterification of b1) 10 to 70 mol% of a dicarboxylic acid composition comprising b11) 50 to 100 mol%, based on the dicarboxylic acid composition, of one or more aromatic dicarboxylic acids or derivatives thereof, b12) 0 to 50 mol%, based on said dicarboxylic acid composition b1), of one or more aliphatic dicarboxylic acids or derivatives thereof, b2) 2 to 30 mol% of one or more fatty acids or fatty acid derivatives, b3) 10 to 70 mol% of one or more aliphatic or cycloaliphatic diols having 2 to 18 carbon atoms or alkoxylates thereof, b4) 2 to 50 mol% of a polyether polyol having a functionality of not less than 2, prepared by alkoxylation of a polyol having a functionality of above 2, all based on the total amount of components b1) to b4), wherein said components b1) to b4) sum to 100 mol%, C) optionally further polyester polyols other than those of component B), D) polyether polyols, E) optionally flame retardants, F) one or more blowing agents, G) catalysts, and H) optionally further auxiliaries or addition agents, wherein the mass ratio of total components B) and optionally C) to component D) is less than 1.6. A) at least one polyisocyanate, B) at least one polyetherester polyol obtainable by esterification of b1) 10 to 70 mol% of a dicarboxylic acid composition comprising b11) 50 to 100 mol%, based on the dicarboxylic acid composition, of one or more aromatic dicarboxylic acids or derivatives thereof, b12) 0 to 50 mol%, based on said dicarboxylic acid composition b1), of one or more aliphatic dicarboxylic acids or derivatives thereof, b2) 2 to 30 mol% of one or more fatty acids or fatty acid derivatives, b3) 10 to 70 mol% of one or more aliphatic or cycloaliphatic diols having 2 to 18 carbon atoms or alkoxylates thereof, b4) 2 to 50 mol% of a polyether polyol having a functionality of not less than 2, prepared by alkoxylation of a polyol having a functionality of above 2, all based on the total amount of components b1) to b4), wherein said components b1) to b4) sum to 100 mol%, b1) 10 to 70 mol% of a dicarboxylic acid composition comprising b11) 50 to 100 mol%, based on the dicarboxylic acid composition, of one or more aromatic dicarboxylic acids or derivatives thereof, b12) 0 to 50 mol%, based on said dicarboxylic acid composition b1), of one or more aliphatic dicarboxylic acids or derivatives thereof, b11) 50 to 100 mol%, based on the dicarboxylic acid composition, of one or more aromatic dicarboxylic acids or derivatives thereof, b12) 0 to 50 mol%, based on said dicarboxylic acid composition b1), of one or more aliphatic dicarboxylic acids or derivatives thereof, b2) 2 to 30 mol% of one or more fatty acids or fatty acid derivatives, b3) 10 to 70 mol% of one or more aliphatic or cycloaliphatic diols having 2 to 18 carbon atoms or alkoxylates thereof, b4) 2 to 50 mol% of a polyether polyol having a functionality of not less than 2, prepared by alkoxylation of a polyol having a functionality of above 2, C) optionally further polyester polyols other than those of component B), D) polyether polyols, E) optionally flame retardants, F) one or more blowing agents, G) catalysts, and H) optionally further auxiliaries or addition agents,