Try some vinegar, cold wash is fine.
I had this problem with my old washing machine. I didn't get to the problem quick enough, and long story short, I have a new washing machine now