there is always a filter however small , but you don't say if the machine is a dishwasher or washing machine. Mouldy smells are either stale water , a blocked exit pipe from the machine , a blocked drainage system, or a back drainage from the drain outlet. The latter can occur when the machine's outlet pipe is not looped higher than a connection into the kitchen sink outlet and dirty water can make it's way back into the machine.
Other smelly sources in washing machines are in , and, under the soap drawer and around the folds of the door seal. To keep the soap drawer clean, put you soap/tablets into the drum where they dissolve better.
Maximo, July 2008