You're usually best cleaning out everything and starting with clean surfaces. There are numerous seals available through High Sky or Vintage Trailer. The most important thing is to have a clean/even application without gaps. But your "foam gew" comments make me nervous - were the door or frame surfaces dented and the prior owner filled them in? If so, that could be more serious work.
Mark & Melanie Trowbridge
1964 Airstream Sovereign 30' (Double)
2004 Dodge Ram QuadCab 4x4 Diesel