1,306. Doors and Windows
202:6 We have a received tradition from Moshe at Sinai regarding the door that will be used to remove the deceased from the house where he lies. Through this removal, the house will become clean. This is because, even though this door is closed, it's considered as if it were open. Therefore, a kohein is not permitted to stand under the lintel, even though the door is physically closed.
Similarly, if there is a roof that extends a handbreadth over the door, this transmits the impurity to every place possible, as if the door were open. However, if there was a door or a window of four handbreadths by four handbreadths (about 14" square) open on another side, then the closed door isn't treated as if it were open and a kohein is permitted to stand there so long as the impurity can't reach him via the open door or window.
202:7 Let's say that a kohein is in a house or a room whose doors and windows are closed in such a way so that the door doesn't have an opening of a handbreadth (about 3.5 inches) and the window doesn't have an opening the size of a small coin. If the kohein hears that there is a dead person in the neighborhood and opening the door or the window will enable the impurity to reach him, he may not open it. Rather, he must remain where he is until they have removed the deceased. This is because as long as there isn't an opening of a handbreadth, the ritual impurity doesn't enter. As soon as such an opening is made, it does.