419. Invalid Mezuzah Placement

Tefillin, Mezuzah v’Sefer Torah 5:8

If one hangs a mezuzah inside a pole, it is invalid because it has not been attached. If he places it behind the door, it’s like he has done nothing. If one hollows out a doorpost and places a mezuzah in it horizontally, it is invalid. If one places it in the doorpost more than a handbreadth deep (about three inches), it is invalid. If one places the mezuzah in a reed case, then binds this reed with other reeds and builds a doorpost out of them, it is invalid because the mezuzah was attached to the doorpost before the doorpost was part of the entryway.

Tefillin, Mezuzah v’Sefer Torah 5:9

A mezuzah on private property should be checked twice in a seven-year period; one on public property should be checked twice in a fifty-year period, out of concern that a letter may have faded or cracked. Since it is placed inside a wall, the possibility exists that it may deteriorate.