Hello, this is Dr. Bruce and I would like to help you with Maggie.
I'm sorry to hear that she is having this issue. I also apologize for how long it took for someone to respond to your question.
I would suspect that Maggie is having problems with her anal glands. Anal glands are scent glands, and normally when dogs poop, the glands get squeezed by the feces going by, and deposit a scent that is unique for each dog. That is why dogs sniff each other's butts when they meet. They are smelling the odor of the anal glands.
Some dogs will develop issues with the anal glands such as impaction, or infection. In rare cases, the anal glands can develop cancer.
I would strongly urge you to take Maggie to your vet for an examination, and to have the anal glands emptied by the vet. If necessary, Maggie may need to have antibiotics given by mouth if there is an infection.
It would be wise to run a test on the stool to make sure that she doesn't have worms, because that can cause similar symptoms as anal gland problems.
This article gives more information about anal glands. http://www.peteducation.com/article.cfm?c=2+2090&aid=510
I hope this helps and that Maggie is feeling better very soon. If you would like to continue this chat, please reply to this post and I will get back to you as soon as possible.