Most people will tell you not to stop exercising at all.
Frankly, I don't think that's strong; it's just plain stupid!
See a doctor; get antibiotics if your pneumonia is bacterial. If it's viral it may very well become life-threatening, so be prepared to go into the hospital at short notice!
And do not resume your normal activities until your immune system has had the chance to recover your body's overall health. Bed rest is the best thing to do, though hardly anyone does it.
People who force themselves to keep going no matter what or to go back to doing things too soon will find out the hard way that their illness lasts much longer and can get a lot worse.
Make sure your primary care physician or ear, nose and throat specialist knows all the details. This isn't something to take lightly, though so many people do.