Preheat the oven to 180C / 350 F and line a medium bread loaf pan with baking paper.
Heat the olive oil in a non-stick frying pan and sauté the onions and star anise over a gentle heat for around 8 - 12 minutes until they are soft and just start turning golden. season with salt & pepper. You do not want to brown them. Set them aside and allow to cool slightly.
Sift the flour and add the salt, cheese and herbs. Add the cooled onions and mix. Add the red pesto to the buttermilk and stir. Add this along with the water to the flour and gently mix with a wooden spoon until it forms a sticky dough.
Spoon the dough into the prepared loaf pan and bake for 1 1/2 hours until golden brown on top. You will know your bread is done when you insert a sharp knife or skewer into the thickest part and it comes out clean.
Notes
* to prevent the top from over-browning it may be necessary to loosely cover it with a piece of foil from about 40 minutes into the baking time