As mayo is made with raw eggs, its shelf life is limited by the risk of salmonella. Salmonella is killed by heating and acid.
Here is the safest method of preparing mayonnaise that I know of:
Method for assuring destruction of Salmonella spp. in egg yolk.
Place egg yolk(s) in a small, stainless steel bowl. (The container must be large enough so that it can allow the egg yolk/acid mixture to be stirred or whisked as it is heated.) Place the container containing the egg yolk/acid mixture in a pan or bowl of water (such as a small double boiler) that is at a simmering temperature of 180 to 190F (82.2 to 87.8C). Heat the yolk/acid mixture to a temperature of 150F (65.6C). This will take about 1 minute. The mixture must be stirred or whisked constantly and the temperature measured frequently by using a micro-tip thermocouple thermometer (such as the Atkins 33040 ). Immediately remove the pan containing the yolk/acid mixture from the hot-water heat source. The yolk/acid mixture is now pasteurized and can be used in the preparation of mayonnaise and Caesar dressing.
Recipes for these products should be checked, or recipes provided in this paper should be used to assure that there is the correct amount of acidity. As a starting point, the standard of identity for vinegar is 5% acetic acid. The amount of citric acid in lemon juice (bottled or freshly squeezed) is 4.7%. A typical mayonnaise should be prepared with 1 raw egg yolk per 8 ounces of oil and the acid concentration should be 1.4% of the aqueous phase as recommended by the FDA (CFR Title 21 Part 101.100).
Source: http://www.hi-tm.com/Documents/Mayonnaise.html
I don't know what the shelf life of this kind of mayonnaise is, but if this doesn't give you the duration you want, I doubt that there is another method to make it longer, except maybe using pasteurized eggs.
If you follow the method, make sure you are actually using a thermometer. It does not insure the safety if you don't reach the temperature mentioned, but if you get it a bit hotter, trying to make sure you reached it, your yolks will curdle. Also, note that the salmonella don't magically drop dead the second a threshold temperature is reached. They start to diminish, until they have all died. So I don't remove the mixture from the water bath, but make the mayonnaise in the water bath itself, giving it a longer time on the heat.