Every three months I run the machine empty on the hottest wash, with the cheapest washing powder that has bleach (or whitener) in it. I use an own brand that I buy just for this purpose.
The bleach and hot water kills all the bacteria and mould that is causing your problem. It is caused by the use of liquid detergents, in particular the 'colour kind' and 'sensitive' ones, and washing on a low temperature. The warm damp atmosphere is an ideal breeding ground for nasties which aren't being killed off by modern detergents and low temperatures.
If you live in a hard water area, you should use calgon or similar - I use Oust every three months. Boiling water will not prevent or clear limescale. Just look inside your electric kettle.
Also, remove the detergent drawer, take it to bits and give it a good scrub in detergent. Scrub out the drawer cavity as well. I find a baby bottle brush to be excellent for this.
You should also clear out the water jets in the roof of the cavity. I have a piece of strong, but flexible, plastic for this - a cable tie. This will help the water to flow out at the proper rate.