Reproductive behavior in Drosophila has both stereotyped and plastic components that are driven by age- and sex-specific chemical cues. Males who unsuccessfully court virgin females subsequently avoid females that are of the same age as the trainer. In contrast, males trained with mature mated females associate volatile appetitive and aversive pheromonal cues and learn to suppress courtship of all females. Here we show that the volatile aversive pheromone that leads to generalized learning with mated females is (Z)-11-octadecenyl acetate (cis-vaccenyl acetate, cVA). cVA is a major component of the male cuticular hydrocarbon profile, but it is not found on virgin females. During copulation, cVA is transferred to the female in ejaculate along with sperm and peptides that decrease her sexual receptivity. When males sense cVA (either synthetic or from mated female or male extracts) in the context of female pheromone, they develop a generalized suppression of courtship. The effects of cVA on initial courtship of virgin females can be blocked by expression of tetanus toxin in Or65a, but not Or67d neurons, demonstrating that the aversive effects of this pheromone are mediated by a specific class of olfactory neuron. These findings suggest that transfer of cVA to females during mating may be part of the male's strategy to suppress reproduction by competing males.