Peel and finely dice the onion. Heat the oil in a saucepan, and sauté the onions until translucent.
Rinse and coarsely chop the tomatoes. Add the tomatoes and the remaining ingredients to the pot. Bring to a boil, stirring constantly. Reduce the heat to medium and simmer for 1 hour, stirring frequently. Pass the ketchup through a fine strainer and return to a boil. Cook another 10 minutes, then season the ketchup to taste. Fill the prepared, sterilized jars with the ketchup and seal tightly. Turn upside down for 10 minutes to cool slightly, then turn right side up and cool completely.