Masruq said: A person in a state of major impurity (junub) may not pass through the mosque except out of necessity.