Dice the capsicums into 2.5 cm (1 inch) cubes. Heat the oil in a large heavy-based frying pan over medium heat. Cook the capsicum, stirring regularly, for 20 minutes. Add the chillies, garlic, star anise and bay leaves. Cook for another 10 minutes, then reduce the heat to low and simmer for 1½ hours. Stir in the spice mix.
Transfer the mixture to an upright blender and blend until smooth, then pass through a drum sieve (tamis). Season with the salt and vinegar. Place the harissa in a piping bag fitted with a 2 mm (1/16 inch) plain nozzle and refrigerate until ready to serve.