There are actually two types of smog: sulfurous smog and photochemical smog. Sulfurous smog results from burning sulfur-bearing fossil fuels, which release a high concentration of sulfur oxides in the air.
The best way to avoid anthrax is to stay away from livestock and slaughtered meat in countries where the disease is likely to occur.