The glue applied to envelopes is of two basic types. The glue applied to the flap that is sealed by the consumer is usually a gum. A typical natural gum is gum arabic, derived from a substance produced by the acacia tree. Synthetic gums are often derived from dextrans, which are produced by the fermentation of sugar. The glue that holds the rest of the envelope must be stronger and more permanent. This glue is often derived from starches, which are obtained from corn, wheat, potatoes, rice, and other plants.
The cockroach thing is an urban legend:
"The Roach Eggs in Envelope Glue Urban Legend
The story goes something like this:
A woman suffered a paper cut on her tongue while licking an envelope. She thought little of it, suffering through a day or two while her tongue cut healed itself up. In fact, she forgot all about it after a week, even when she started to feel discomfort in her mouth. Her tongue began to swell slightly, and she went to the doctor, worried about infection. The doctor, deciding there was pus under the swelling that needed to be let out, made a small incision…releasing dozens of tiny roaches that had hatched from eggs stuck to the envelope glue."
And how about on Seinfeld -- episode, "The Invitation" -- George's (Jason Alexander) fiance, Susan, dies from licking the wedding invitation envelopes. Classic!
If you google "envelope glue ingredients" or "dying from licking envelope glue" you'll see all kinds of funny urban legends.
So, it's not made of cockroach parts, although I could see small insects getting stuck (like the old fashioned flypaper) if the glue became a little moist :)
Hope this clears it up for you!