Wash tomatoes thoroughly. Core and roughly chop.
In a large stockpot, sauté onions and garlic in olive oil until soft and fragrant.
Add chopped tomatoes and bring to a boil. Reduce heat and simmer for 1–2 hours until thickened.
Pass mixture through a food mill or blend for smoother consistency (optional).
Stir in oregano, basil, salt, and sugar if using. Simmer an additional 15–20 minutes.
Prepare jars by washing and keeping them warm.
Add 2 tablespoons bottled lemon juice to each quart jar.
Ladle hot sauce into jars, leaving ½ inch headspace.
Remove air bubbles, wipe rims clean, and apply lids fingertip tight.
Process in a boiling water bath canner for 40 minutes (adjust for altitude if needed).
Remove jars and cool undisturbed for 12–24 hours. Check seals before storing.