Mezuzah theft is a common act of antisemitism or vandalism. It has also been suggested that mezuzot are often stolen by people who imagine that they are some type of lucky charm. If this is a real concern, ideally one should protect the mezuzah by carving out a space for it from the doorway. One must be careful not to insert the mezuzah into the hole more than a tefach, as it would then be considered in the wall and not in the doorway. It is also important that the Divine name of Sha-dai, written on the outside of the mezuzah or the letter Shin on an opaque cover should remain visible.
Alternatively, one may affix the mezuzah on the continuation of the doorpost behind the closed door, as it would still be within the doorway, though not visible from the street.
If these options are not feasible, you may place the mezuzah on the door frame facing the room.[A] If the door has no frame, you may put the mezuzah on the inner wall itself within a tefach of the doorway opening.
This is definitely not an ideal solution since according to many authorities this placement is not halachically valid as it is not within the doorway. For this reason, you should not make a berachah.
 Agur B’ohalecha 14:2
 Agur B’ohalecha 14:12; Chovas HaDar 8:2; Mezuzot Beitecha 289:8; Kitzur 11:9. Chayei Adam (15:21, Nishmas Adam 15:1) writes that it should be placed on the post and not on the inner wall. Agur B’ohalecha (14:15:39) asserts that once it is on the inner face, it makes no difference whether it is on the post or on the wall.