In eukaryotic cells, protein secretion provides a complex organizational problem. Secretory proteins are first transported, in an unfolded state, across the membrane of the endoplasmic reticulum (ER), and are then carried in small vesicles to the Golgi apparatus and finally to the cell membrane. The ER contains soluble proteins which catalyse the folding of newly synthesized polypeptides. These proteins are sorted from secretory proteins in the Golgi complex: they carry a sorting signal (the tetrapeptide KDEL or a related sequence) that allows them to be selectively retrieved and returned to the ER. This retrieval process also appears to be used by some bacterial toxins to aid their invasion of the cell: these toxins contain KDEL-like sequences and may, in effect, follow the secretory pathway in reverse. The membrane-bound receptor responsible for sorting luminal ER proteins has been identified in yeast by genetic means, and related receptors are found in mammalian cells. Unexpectedly, this receptor has a second role: in yeast it is required to maintain the normal size and function of the Golgi apparatus. By helping to maintain the composition of both ER and Golgi compartments, the KDEL receptor has an important role in the organization of the secretory pathway.