Mayonnaise does not have as long of a shelf-life as many people think, and should not be left out unrefrigerated for more than a couple of hours. Leftovers that have been refrigerated immediately after preparation can be eaten safely for 2 to 3 days.
Because of the high fat content in mayonnaise, it can be difficult to tell that it is spoiled by sight alone. If there is a question about whether mayonnaise is still good, it is better to err on the side of caution and throw it out. Spoiled mayonnaise may look more yellowish than normal, and may thicken up and have a lumpy consistency.