Venting Bathroom Exhaust: Exhaust diverted into attic can cause mold and reduce insulation efficiency

I need some tips on venting bathroom exhaust. I recently realized that my second floor bathroom fan simply sends the moist humid air from my bathroom straight into my attic. Would it work to run some ridged vent pipe to…