The problem with homemade mayonnaise is that it becomes rancid quickly and separates. They usually recommend 4-7 days in the refrigerator. It is good to use pasteurized eggs and also add acid to keep mayo safe. I would suggest that you make small batches and use as quickly as possible for quality.
If you notice off flavors then discard. Using pasteurized eggs and vinegar and or lemon juice will help keep the mayo safe so it is usually quality that makes you want to discard it.
Thanks for using Ask an Expert