Males of the olive fruit fly Bactrocera dorsalis team up with Bacillus bacteria in their rectal glands to synthesize 2,3,5-trimethylpyrazine (TMP) and 2,3,5,6-tetramethylpyrazine (TTMP) from glucose and threonine. The bacterially produced TMP and TTMP are utilized as sex pheromones to attract virgin females.