Both sexes can produce smegma. In males, smegma is produced and can collect under the foreskin; in females, it collects around the clitoris and in the folds of the labia minora.
The accumulation of sebum combined with dead skin cells forms smegma. Smegma clitoridis is defined as the secretion of the apocrine glands of the clitoris, in combination with desquamating epithelial cells. Glands that are located around the clitoris and the vulva majoris secrete sebum. Contaminated, and retained smegma (smegmaliths) usually disappear when the cause is removed.
Smegma was originally thought to be produced by sebaceous glands near the frenulum called Tyson's glands; however, subsequent studies have failed to find these glands. Wright states that smegma is produced from minute microscopic protrusions of the mucosal surface of the foreskin and that living cells constantly grow towards the surface, undergo fatty degeneration, separate off, and form smegma. Parkash et al. found that smegma contains 26.6% fats and 13.3% proteins, which they judged to be consistent with necrotic epithelial debris. Newly produced smegma has a smooth, moist texture. It is thought to be rich in squalene and contain prostatic and seminal secretions, desquamated epithelial cells, and the mucin content of the urethral glands of Littré. Some state that it contains anti-bacterial enzymes such as lysozyme and hormones such as androsterone, though others dispute this.
According to Wright, little smegma is produced during childhood, although the foreskin may contain sebaceous glands. She also says that production of smegma increases from adolescence until sexual maturity when the function of smegma for lubrication assumes its full value, and from middle-age production starts to decline and in old age virtually no smegma is produced. Oster reported that the incidence of smegma increased from 1% among 6-7 and 8-9 year olds to 8% among 14-15 and 16-17 year olds (an overall incidence of 5%).
In healthy animals, smegma helps clean and lubricate the genitals. In veterinary medicine, analysis of this smegma is sometimes used for detection of urogenital tract pathogens, such as Tritrichomonas foetus. Accumulation of smegma in the equine preputial folds and the urethral fossa and urethral diverticulum can form large "beans" and promote the carriage of Taylorella equigenitalis, the causative agent of contagious equine metritis. Some equine veterinarians have recommended periodic cleaning of male genitals to improve the health of the animal.
^Chen, X.G.; J. Li (2001). "Increasing the sensitivity of PCR detection in bovine preputial smegma spiked with Tritrichomonas foetus by the addition of agar and resin". Parasitol Res87 (7): 556–558. doi:10.1007/s004360100401. PMID11484853.Cite uses deprecated parameters (help)
^Primary Industries Ministerial Council of Australia and New Zealand (2002). Disease strategy: Contagious equine metritis (Version 1.0). In: Australian Veterinary Emergency Plan (AUSVETPLAN), Edition 3, PIMCANZ, Canberra, ACT.