This article presents a model of egg rejection in cases of brood parasitism. The model is developed in three stages in the framework of signal-detection theory. We first assume that the behavior of host females is adapted to the relevant parameters concerning the appearance of the eggs they lay. In the second stage, we consider the possibility that females make perceptual errors. In the final stage, females must learn to recognize their own eggs through an imprinting process. The model allows us to make a number of predictions concerning the egg types that should be rejected in different circumstances: egg rejection should increase as the parasitism rate increases and egg mimicry deteriorates; host females' erroneous ejection of their own eggs should be expected for intermediate levels of egg mimicry but not for very good or very poor mimicry; host females would benefit most from learning to recognize their own eggs when individual variability in egg characteristics is much lower than the population variability; and, when egg mimicry is poor or individual variability is very low, females should attempt to imprint on the first egg they lay, before they can be parasitized, but, when mimicry is good and individual variability is relatively high, females must use an extended learning phase. The model provides a framework to study how the enigmatic acceptance of parasitic eggs can be explained by adaptive discrimination mechanisms.