Preheat the oven to 160C/325F/Gas 3 (140C fan).
Place the gammon in a deep saucepan that it just fits, add the bay leaves, onion and peppercorns. Add enough water to cover the gammon, then bring to the boil and cover with a lid. Transfer to the preheated oven and cook for about two hours, or until tender.
Increase the oven temperature to 220C/425F/Gas 7 (200C fan).
When the ham is cooked, remove it from the pan, and, using a sharp knife cut off the skin, leaving a layer of fat underneath. Place the gammon in a small roasting tin.
Mix the glaze ingredients together and pour over the layer of fat. Score the fat into diamond shapes and roast for about 20-25 minutes, or until golden-brown, basting halfway through the cooking time.
While the gammon is cooking you can make the chutney. Heat the oil in a medium sized pan and fry the onions over a low heat until really tender and transparent but not browned. Add all the remaining ingredients, bring to the boil, then simmer for about 10 minutes, or until the apricots have softened and everything is soft and pulpy.
Serve the chutney hot or cold. If cold, spoon into sterilised jars, label and seal the top.