And know that from the phrasing "he shall nail it etc." or "he shall dig a hole for it etc.," it is explicitly implied that when digging a hole, nails are not required. The reason is: since it is placed inside it, it is as one with the mezuzah of the wall. For specifically when it is **upon** the mezuzah of the wall it is not a connection without nails, but not when it is **inside it**. (And even though it seemingly appears from the wording of Rashi and Tosafot in Bava Metzia 102a, s.v. *begubta*, that even upon the mezuzah nails are not required, and so wrote the Bach—there is no proof from there. And see Maharal of Lublin, and so wrote the Nimukei Yosef there, and this is his wording: that he should fix it there with planks or with lime, and there is no need to engrave within the mezuzah. Thus far his words. And so it is explicit in the Yerushalmi at the end of Megillah, which says: and even if he did not nail it. And it asks: but was it not taught "provided that he nailed it"? And it answers: provided that he designated it for that purpose; those of the house of Milyon would do so during wars, see there. And this is the explanation: that when he designated it for that purpose so that it should be there permanently, such as when he dwells in the house, it is not effective without nailing. And that which it said "even if he did not nail it"—this is when traveling on the road and doing so only as a mere remembrance, such as during a time of war when they have no permanent house and are exempt by law from mezuzah. Rather, those of the house of Milyon would hang it as a mere remembrance. And so in Menachot 32b, those of the house of Munbaz would do so in inns, as a remembrance of the mezuzah, see there. And I wonder at the Bach and at the Shach, subsection 7, who wrote that for a temporary period nails are not required, see there, for it is implied from their wording that they fulfill the obligation with this. But it is not so as I have written, for one does not require a mezuzah at all in such a case except as a mere remembrance. And perhaps their intention is also thus. Examine it and you will find it simple.)
ודע דמלשון "ימסמרנה וכו'" או "יחפור בה חפירה וכו'", משמע להדיא דבחופר חפירה אין צריך מסמרים. והטעם: דכיון שמונחת בתוכה – הרי היא כאחת עם מזוזת הכותל. דדווקא כשהיא '''על''' מזוזת הכותל אינה חיבור בלא מסמרים, ולא כשהיא '''בתוכה'''. (ואף דלכאורה מלשון רש"י ותוספות בבבא מציעא קב א בד"ה בגובתא משמע דגם על המזוזה אין צריך מסמרים, וכן כתב הב"ח – אין ראיה משם. ועיין במהר"ם לובלין, וכן כתב שם הנימוקי יוסף, וזה לשונו: שיקבענה שם בנסרים או בסיד, ואין צריך לחקוק בתוך המזוזה. עד כאן לשונו. וכן מפורש בירושלמי שלהי מגילה, שאומר: ואפילו לא סמרו. ופריך: והא תני והוא שסמרו? ומתרץ: והוא שייחדו לכך של בית מליון, היו עושים כן בפולמסאות, עיין שם. והכי פירושו: דכשייחדו לכך שתהא שם בקביעות, כגון שדר בהבית אינו מועיל בלא סימור. והא דאמר "אפילו לא סמרו" – זהו בהולך בדרך ועושה רק לזכרון בעלמא, כמו בשעת מלחמה שאין להם קביעות בית ופטורים מן הדין ממזוזה. אלא של בית מליון היו תולין לזכרון בעלמא. וכן במנחות לב ב של בית מונבז, היו עושין כן בפונדקאות כן, זכר למזוזה, עיין שם. ותמיהני על הב"ח ועל הש"ך סעיף קטן ז, שכתבו דלפי שעה אין צריך מסמרים, עיין שם, דמשמע מלשונם שיוצאים בזה. ואינו כן כמו שכתבתי, דאין צריך מזוזה כלל בכהאי גוונא אלא לזכרון בעלמא. ואולי גם כוונתם כן הוא. ודייק ותמצא קל.)