To communicate with conspecifics, animals deploy various strategies to release pheromones, chemical signals modulating social and sexual behaviors 1-5. Importantly, a single pheromone induces different behaviors depending on the context and exposure dynamics 6-8. Therefore, to comprehend the ethological role of pheromones, it is essential to characterize how neurons in the recipients respond to temporally and spatially fluctuating chemical signals emitted by donors during natural interactions. In Drosophila melanogaster, the male pheromone 11-cis-vaccenyl acetate (cVA) 9 activates specific olfactory receptor neurons (ORNs) <up>10, 11</up> to regulate diverse social and sexual behaviors in recipients 12-15. Physicochemical analyses have identified this chemical on an animal's body <up>16, 17</up> and in its local environment <up>18, 19</up>. However, because these methods are imprecise in capturing spatiotemporal dynamics, it is poorly understood how individual pheromone cues are released, detected, and interpreted by recipients. Here, we developed a system based on bioluminescence to monitor neural activity in freely interacting Drosophila, and investigated the active detection and perception of the naturally emitted cVA. Unexpectedly, neurons specifically tuned to cVA did not exhibit significant activity during physical interactions between males, and instead responded strongly to olfactory landmarks deposited by males. These landmarks mediated attraction through Or67d receptors and allured both sexes to the marked region. Importantly, the landmarks remained attractive even when a pair of flies was engaged in courtship behavior. In contrast, female deposits did not affect the exploration pattern of either sex. Thus, Drosophila use pheromone marking to remotely signal their sexual identity and to enhance social interactions.