Our dryer is located in the center of our house. The current vent situation has tubing that makes several bends between the dryer and the crawl space before hitting metal duct that takes it about 25' across the crawl space to exhaust under our deck. There are several elbows in this run. We have converted from gas heat to an electric air-to-air heat pump in recent years and have closed up exhaust flue from the old furnace that starts almost directly above where the dryer vent leaves the dryer and comes into the furnace area before going through the floor to the crawl space. If I redirect the vent up to the flue and out the roof, we'll cut a lot off the distance the air has to travel and remove most of the elbows. Is this a good idea?
The only way you could use an existing flue for a dryer vent is if you can run a smooth 4 inch metal duct down the flue to the dryer. A masonry flue will capture lots of lint and plug up quickly, thus stopping any venting and creating a fire hazard. The previous answers give good info, a good water tight cap and vertical venting specs are important.