"Caused by the war" is a tricky phrase. War brings large numbers of people into motion and spreads disease.
Smallpox was rampant during the war. Slave populations in particular hadn't been immunized, but given the competence of many practitioners, immunization often only spread the disease. Much the same thing happened during the American Revolution.
There was no vaccine for smallpox (or anything else) at the time.
During the Revolution Washington inoculated the Army, and the same procedure was available in the 1860s, but this procedure was a LOT riskier than true vaccination. It actually gave you the disease, just hopefully a less virulent case.