This could be a couple of things. The most likey cause is a bacterial or fungal skin infection. This can be a problem even if you see no redness or itching. You should see the vet to rule this out as a cause.
Another problem might be the dog's anal glands. Dogs have two glands at 10 and 2 like a clock beneath the tail. These glands secrete a smelly substance every time your dog poops. Sometimes these glands leak this foul substance and the smell is pretty bad once it's on the dog's skin. If you suspect this, you can use a baby wipe or vinegar wash to clean the skin on his bottom. Your vet can express the glands for you and hopefully take care of the smell.
Let me know if you still have questions.