First, a sniff test. If there's anything sour or foul about the way your mayo smells, it has likely gone bad. A rank odor ...
Before it's opened, a jar of mayo will last in the pantry for about ... but that doesn't necessarily mean that it's gone bad.