Silicone RTV is about the only material that will go up to around 500 degrees and is formable for your application. I hate the stuff but in your situation....I think it is your only choice. Get the automotive type at NAPA that they use to form gaskets.
Lew Farber-RVIA Certified Master Tech...ABYC Certified Master Marine Electrician MASTER TECH ENERGY SYSTEMS, INC.
AM SOLAR FACTORY AUTHORIZED SALES & INSTALLATIONS ...AMS LITHIUM BATTERIES...MAGNUM INVERTERS…VICTRON ENERGY COMPONENTS ...LIFELINE AGM BATTERIES…MARINE REFRIGERATION