I use a foam kind oven cleaner. Pray it inside the pipe, let it work for 30 minutes and flush it out with tap water, you will be amazed how much black dirt can come out.
On the outside I use the same stuff and after 30 minutes wipe it off with a Brillo pad