Wash the onions and carrots. Chop them into big pieces along with the celery.
Heat the olive oil in a large pan and add the chopped vegetables once the oil is hot. Cook until the vegetables are soft.
Wash the tomatoes and cut into thick slices. Add them to the softened vegetables. Stir well. Strip the rosemary leaves from the stem and add to the vegetables. When it starts to boil, lower the heat and reduce by two-thirds.
Take the pan off the hob and blend the sauce in a blender. Season with salt and pepper.
Sterilise your jars, fill them with the sauce and cap tightly. Store in a cool place.