There's a new bathroom fan switch called a DewStop out there. It's supposed to keep the fan on as long there's condensation in the room and then turn it off when there's not. It's for home use, like in a bathroom or laundry room. It doesn't work that well for attics though I think, so for this it would probably only solve the bathroom part of the problem, or mostly solve it anyway.
I have a similar problem because I tried to go cheap and use a vinyl dryer vent tube. Didn't think about condensation. The little ridges almost double the amount of surface area the water vapor has to condense on. I got lucky and the tube drooped causing a U-trap, but then the air I was trying to vent couldn't escape. At least it wasn't draining back down through my bathroom ceiling!
Anyway, I hung the tube between two rafters so it will once again droop, but NOW I have installed a small vinyl drain tube at the bottom of that U-trap so any buildup will drain out of that, down to my soffit and on the ground below. Hopefully this will help drain any excess condensation. I tried running the fan for 20-30 min after showering, but eventually it still built up and is making my vent fan useless. I don't really want to crawl up into my attic every month to drain a bath vent tube.