I suspect that this is the handiwork of someone that is very unskilled, has no knowledge of code, and likely has made other mistakes.
The air exhausted from a dryer is very very very warm and carries a great deal of moisture vapor. As soon as that exhaust hits cold air the moisture vapor will condense to liquid water. Liquid water will them fall down and cause problems. There may very well be liquid water leaking right back into the pipe. If you live in an area where there is often snow on the roof there can be dangerous build up of melted snow that refreezes into ice that seeps back into a the roof. Codes often specify a type of vent that will prevent this.
There are ways to do this with a specific anti-condensing vent or using a vent line that exits through a side wall horizontally so any liquid can safely drip away.
http://www.dryerjack.com/djk486/index.html You will note that thing is sorta HUGE so that it does not make a mess. It also has flap so that squirrels do not crawl into the exhaust when the dry is not running and fill it with acorns. It also has a removable access so that you can clean out the lint -- that is a code requirement in many jurisdictions as a lint filled dryer vent is often a fire waiting to happens!
I am afraid you have to rip out your ceiling to diagnose the extent of the damage. You should also have the proper type vent to safely get the dry exhaust out to the roof. The pipe itself needs to have a proper weather sealing "boot" on it.
This could get very expensive and may be worth making a claim on your home owner's policy. It may be best to re-route to a side wall...