Prepare a square single layer of cheesecloth that will fit all the spices with room to fold and secure the contents.
Place the cloves, bay leaf, cinnamon stick, celery seeds, chile flakes, and allspice in the middle of the cheesecloth. Fold closed and secure with a length of kitchen twine.
In a medium stock pot 4-quarts or larger (enough to house the tomatoes with some extra room) place tomatoes, salt, vinegar, sugar, onion, chile, garlic and spice packet. Cook over medium heat until tomatoes and chiles are soft and onions are translucent and limp (about 30 minutes).
Remove and discard spice packet. Puree the sauce using an immersion blender, traditional blender or food mill.
Strain the ketchup through a fine mesh strainer back into the cooking pot. NOTE: this step removes any seeds.
Store in a sealed glass container in the refrigerator for up to 3 weeks.
Adapted from Saveur Magazine