By my experience on Washer Machines, I would say that the problem are bacteria and mildew growing in the machine, not exactly in the drain or drum from the machine. Mildew can grow everywhere.
Oh, by the way, don't even think about bypassing any sensor from your machine. You don't want to wake up tomorrow and find a pool in your house, right?
To kill mildew and bacteria you may want to try some simple solutions:
* Keep the lid up between washes so that bacteria and mildew won't grow in it. Pour a bottle of vinegar in hot water and run it though the machine on a heavy load wash. When it is finished, leave the lid up.
* Didn't help? then pour a box of baking soda in it and running it with hot water cycle. Try running it without clothes.
... I mean, Run the washer machine without clothes inside. (Oh my gosh, I should go to bed, it's too late for giving advice on FixYa)
* If the smell continues Pour a big bottle of peroxide hydrogen (the 3% one from the drug store) and run a heavy load wash. Be sure not to use good clothes, it will get white. if that does not work, u may have a more serious problem. Perhaps the machine needs to receive maintenance and spray some peroxide hydrogen where the mildew is growing.
Also, You can try a commercial product for this kind of issue: http://www.smellywasher.com/
Some people says that it works when everything else fails.