In several groups of pulmonate snails and slugs there is a mucus gland located inside a depression near the tip of the tail. This gland is known as the caudal gland and the depression containing it as the caudal pit (or caudal fossa). The picture below shows the caudal pit of the slug Arion subfuscus. The swelling anterior to the pit and partially covering it is called the caudal horn.
The caudal pit (arrow) near the tip of the tail of a preserved specimen of Arion subfuscus. The ruler, as always, is in millimeters.
The caudal gland produces mucus that is thicker than that of the pedal gland underneath the sole. The mucus from the latter is what the slugs and snails crawl on. What is the function of the mucus from the caudal gland?
Drawing from Barr, 1927.
Barr (1927) thought that the mucus of the caudal gland was probably used to secure the slug to the surface it was on when it was descending from a tree or a wall. She also observed slugs eat the mucus from each other's caudal gland prior to mating. That observation indicated that the caudal mucus also had a function in mating.
Many years later, Richter (1980) observed the slug Ariolimax columbianus using a strand of caudal mucus to lower itself from trees and shrubs. In addition, he did some tests that demonstrated that the sticky caudal mucus was an effective deterrent against some slug predators, such as shrews and ground beetles.
There will be more on this subject in the future.
Barr, R. A. 1927. Some notes on the mucous and skin glands of Arion ater. Quarterly Journal of Microscopical Science 71:503-525. pdf
Richter, K. O. 1980. Movement, reproduction, defense and nutrition as functions of the caudal mucus in Ariolimax columbianus. Veliger 23:43-47.