The most studied pheromone in Drosophila melanogaster, cis-vaccenyl acetate (cVA), is synthesized in the male ejaculatory bulb and transferred to the female during copulation. Combined with other chemicals, cVA can modulate fly aggregation, courtship, mating and fighting. We explored the mechanisms underlying both cVA biosynthesis and emission in males of two wild types and a pheromonal mutant line. The effects of ageing, adult social interaction, and maternally transmitted cVA and microbes – both associated with the egg chorion – on cVA biosynthesis and emission were measured. While ageing and genotype changed both biosynthesis and emission in similar ways, early developmental exposure to maternally transmitted cVA and microbes strongly decreased cVA emission but not the biosynthesis of this molecule. This indicates that the release – but not the biosynthesis – of this sex pheromone strongly depends on early developmental context. The mechanism by which the preimaginal effects occur is unknown, but reinforces the significance of development in determining adult physiology and behaviour.