In medium skillet heat oil over medium heat. Add onions and cook until soft, about 10 minutes. Transfer to a food processor fitted with the metal blade or a blender.
Add remaining ingredients, except salt, and puree until smooth. Pass through a medium strainer, pressing with a spatula or wooden spoon. Pour into a saucepan, and add the salt. Bring to a boil, reduce heat, and simmer uncovered for about 20 minutes. Adjust the seasonings if desired. Set aside to cool for table salsa or use warm for red rice or chilaquiles. Store in the refrigerator 2 to 3 days or in the freezer for weeks.