Are you referring to the gasket made of cork or cardboard material that is a ring around the rim of the speaker? This serves two purposes; 1- to seal the speaker to the cabinet so no sound waves can leak from the back to the front and 2 - to serve as a buffer for ober zelous people who use a wrench to tighten the speaker screws. If so, that is referred to as the speaker gasket and a part of tyhe speaker not the cabinet.
What size are your speakers and what kind? Different manufacturers made their 15" speaker different sizes. Not by much but 1 quarter inch here...a quarter inch there... Is the speaker mounted from the front or from inside the cabinet? It sounds like it is front mounted.
What are the dimensions of the cabinet? Does it have a port on the speaker panel? Round, square or rectangle? Can you post pictures?
Do not use sealing foam unless you use some window type that has adhesive on one side. I have used a 1/4" x 1/2" foam strip with good results. Just hard to put on.
Anything that is sprayed or brushed on will only be a headache some time in the future.