In a large bowl, dissolve 2 tablespoons of salt in the water. Add the onions, let soak for 10 minutes and drain well.
Heat the olive oil in a large skillet. Add the onions, bay leaves, allspice, marjoram, oregano and pepper and cook over moderately high heat, stirring, until the onions are tender, about 10 minutes. Remove from the heat and stir in the vinegar. Season with salt and let cool. Discard the allspice, marjoram and bay leaves before serving.
The pickled onions can be refrigerated for up to 1 week.