What substances are secreted by the skin lining the outer ear canal and what is their purpose?

ear wax, or also called cerumen. Ear wax moves out dust and other small particles. It collects dirt and other debris in your ear canal and moves it out of your ears as you clean your external ears. Cerumen also helps prevent foreign substances (including insects) from entering the auditory canal.

It also forms a protective layer of wax in the ear canal which is a water repelling shield. Ear canals need to be dry to be healthy.

The wax is also slightly acidic and will prevent the growth of fungi and bacteria.

It also fights infections.