You really need to do a boil wash with washing soda once in a while! No fabric conditioner either, it is a major cause of a smelly machine as it degrades and goes rotten if you use cool washes.
One crucial tip - unless you have small children and/or pets - always leave the machine door open between washes. This used to be the instruction from the manufacturers until idiot children/cats managed to somehow get stuck in machines.
A closed door means a pertually damp (bug friendly) environment in the machine and door seal - no wonder they pong after a while - leave the door open as much as possible and let it all dry out and stay fresh.
Household bleach, about a cupful, run it empty on the hottest setting. You can put your shower curtain in if you wish, it will clean that nicely too. I do that about twice a year.