1. Heat the oil in a large pan and add the onion. Cook, stirring occasionally, until the onion turns a golden brown. Add the garlic and cook, stirring constantly, until fragrant, about 30 seconds. Add the fresh and canned tomatoes, salt, and pepper. Cook over medium-high heat for about 20 to 30 minutes until all the liquid is cooked out and the mixture is very thick, stirring frequently as the water evaporates to prevent scorching.
2. Transfer the tomato mixture to a food processor. Add the mayonnaise and process until smooth. Divide among small containers to freeze, or scrape into one container and refrigerate. The spread can be kept in the fridge for up to two weeks.