Ham has a lot of storage recommendations, depending on the quantity and how it’s prepared. In general (unless it’s in a sealed can), ham has a lot shorter shelf life than many other meats. Fresh, uncured and uncooked ham is the best for freezing and can stay cold for up to six months. Cured but uncooked ham lasts three to four months in the freezer. Canned ham (like SPAM) can last a long time, but once opened it should only stay in the fridge three to four days. Dried hams, like Prosciutto or Serrano, can stay up to three months in the fridge and only one month in the freezer. Cooked country ham should be eaten from the fridge within a week and removed from the freezer after a month.
Source : Goodhousekeeping