Reproductive traits that influence female remating and competitive fertilization rapidly evolve in response to sexual selection and sexual conflict. One such trait, observed across diverse animal taxa, is the formation of a structural plug inside the female reproductive tract, either during or shortly after mating. In Drosophila melanogaster, male seminal fluid forms a mating plug inside the female bursa, which has been demonstrated to influence sperm entry into storage and latency of female remating. Processing of the plug, including its eventual ejection from the female's reproductive tract, influences the competitive fertilization success of her mates and is mediated by female × male genotypic interactions. However, female contributions to plug formation and processing have received limited attention. Using developmental mutants that lack glandular female reproductive tract tissues, we reveal that these glandular tissues are essential for the mating plug to be ejected. We further use proteomics to demonstrate that female glandular proteins, and especially proteolytic enzymes, contribute to mating plug composition and that the absence of glands has a widespread impact of plug formation and composition. Together, these phenotypic and molecular data resolve molecular mechanisms of important postmating, intersexual interactions and cryptic female choice.