Boy, do I have experience with this! The problem with mine was not the rubber gasket on the front. It's in the washer. My machine is on the ground floor of my home so it is subject to warmer temperatures than when the machine is in a basement. The same machine at our city home, and at my sister's, in the basement have not had this problem. It just came up again before I left for a trip about 10 days ago. Here's what I've done what works...
There is a treatment with vinegar and baking soda that helps, just google washing machine odor and it will come up. The Tide washing machine cleaner only masked it, did not fix it. Affresh tablets also seemed to work. Another product that worked is called Smelly Washer. I also use it to treat my bath towels to get the musty odor out that the washer puts in them. After reading all of the comments from people that have dealt with this problem, I also stopped using liquid detergent and fabric softener. I'v gone quite awhile without a problem until this current warm weather hit. Bleach did not cure the problem. Using Borax with your wash may also help. I also tried the new cleaner from Oxyclean, which may have worked. The next day I treated the towels with Smelly Washer so it was hard to tell. So try: Smelly Washer, Affresh (Walmart carries it) or the vinegar/baking soda treatment. Good luck! I use Arm and Hammer detergent packs that have baking soda in them - love the scent and get my clothes very clean. Give them a try.