In a heavy kettle cook onions, garlic, and tomatoes, covered, over moderately low heat, stirring occasionally, until onions are very soft, about 40 minutes. Force mixture through a food mill fitted with coarse disk into a bowl. In a cleaned kettle stir together puree, sugar, and vinegar, and simmer, uncovered, stirring frequently to prevent scorching, until reduced by half, about 20 minutes. Tie cloves, allspice, cinnamon, and celery seed in a cheesecloth bag and add to tomato mixture with mustard and paprika. Simmer mixture, stirring until very thick, about 10 minutes. Discard bag and season mixture with hot sauce and salt. Ketchup may be made 10 days ahead and chilled, covered.
Recipe courtesy of Gourmet Magazine