Actually the vaccines do not protect you from getting pneumonia. They protect you from the toxins produced by several strains of the Pneumococcus bacteria. Pneumonia is bad enough but if you get infected by a strain of Pneumococcus that produces lethal toxins you will probably die unless you have been vaccinated with Pneumovax 23 or Prevnar 13.
However big doses of D3 will produce conditions in your lungs that clear the places where pneumonia takes hold and grows.
(you can look it up)