Combine tomatoes, onions, sweet and hot peppers, sugar and salt in a large sauce pot.
Cook gently 45 minutes.
Tie spices in a cheesecloth bag; add to tomato mixture; cook until mixture is reduced by one half, about 45 minutes.
As mixture thickens, stir frequently to prevent sticking.
Add vinegar and cook slowly until as thick as desired.
Remove spice bag.
Pour hot into hot jars, leaving 1/4-inch head space.
Process 15 minutes in boiling water bath.