Preheat the oven 325 degrees. Line two large baking sheet with foil, parchment or silpats.
Slice off the tops of the tomatoes and cut off any hard portions, removing as many seeds as you can. Quarter the remainder of the tomato and place into a large bowl.
Repeat with remaining tomatoes and once all are in bowls, add both onions, garlic, rosemary, salt and pepper. Drizzle the olive oil on top and toss well to coat.
Spread out over the prepared baking sheets, makes sure all of the tomatoes are cut side up.
Bake for 30 minutes, rotate pans and bake for another 30 minutes.
Increase the temperature to 400 degree and bake an additional 30 minutes.
Process mixture through a food mill to remove any seeds and skins.
Divide into batches and transfer to a blender, blending until just mixed but still has texture.
Transfer all blended tomatoes to a dutch oven over medium high heat.
Add the red wine, sugar and oregano. Stir occasionally until boiling.
Reduce the heat to low and cook for 5 minutes. Season with additional salt and pepper to taste.