Vaetchanan: Chapter 12
The Mezuzah

We are told that affixing a Mezuzah at the door ensures that God will guard the inhabitants when they enter and leave. Another reason for the Mezuzah is that it reminds people of God so they remember to do His will. We hear how the evil demon that stands near the door is distracted so he cannot do any harm.