Although the halachah states that a doorway without a lintel is exempt from mezuzah, if the ceiling’s edge is flush with the opening of the room, many authorities contend that if the edge is shaped like a frame and protrudes slightly it is considered a “virtual lintel.”[A] Others maintain that it is deemed a lintel even if it is flat. In both cases, a mezuzah is affixed without a berachah.[1][B]
If the doorway is simply two posts protruding from the wall and no lintel, even if these “posts” are merely the ends of walls with no fitted wooden or metal posts on them, some authorities require a mezuzah to be affixed on the right post. [2] However, one can rely on the many authorities who exempt this opening entirely.[3] [C]
[1] Mezuzas Melachim, Halachah L’Moshe 109; Chovas HaDar 7:8; Sha’arei HaMezuzah 11:6. Chazon Ish (Y.D.172:2) requires that the end of the ceiling protrudes in a way that it is recognizable as a lintel. Agur B’ohalecha also exempts the end of a ceiling that does not protrude.
[2] Agur B’ohalecha 21:22, citing Mishnah Berurah 346:31 and private correspondence with R. Chaim Kanievsky; Kitzur Shulchan Aruch.
[3] Chazon Ish Y.D. 172:2-3; Minchas Yitzchak 10:91; Chovas HaDar 7:7; Sha’arei HaMezuzah 11:7; Kuntres HaMezuzah 287:5.