Thanks for query,
it seems that you have got some infection in the mouth like in the gums,tartered teeth,route abscess
One possibility is having infection in salivary gland
due to infection in the salivary duct or stone in the ducts causing dirty smell stuff coming out.
Consult oro surgeon and seek his advice.
ok and bye.