Peel, wash and dice the pumpkin. Wash and finely chop the leek. Puree the tomatoes.
Heat olive oil in a saucepan, fry the leek and pumpkin lightly, add the tomatoes and rosemary sprig and season with salt. Cover and simmer over low heat for about 20 minutes. When the sauce is done, remove the rosemary sprig, stir in the cream and parmesan and season with pepper.
In the meantime, cook the penne or rigatoni al dente, strain them and pour into a bowl. Pour in the sauce.