Shulchan Aruch, Yoreh De'ah Siman 285

Siman 285

Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.

א מִצְוַת עֲשֵׂה לִכְתֹּב פ' שְׁמַע (דְּבָרִים ו, ד ט) וְהָיָה אִם שָׁמוֹעַ (דְּבָרִים יא, יג כא) וּלְקָבְעָם עַל מְזוּזַת הַפֶּתַח, וְצָרִיךְ לִזָּהֵר בָּהּ מְאֹד; וְכָל הַזָּהִיר בָּהּ, יַאֲרִיכוּ יָמָיו וִימֵי בָּנָיו. וְאִם אֵינוֹ זָהִיר בָּהּ, יִתְקַצְּרוּ. הַגָּה: וּמִכָּל מָקוֹם אִם אֵין יָדוֹ מַשֶּׂגֶת לִקְנוֹת תְּפִלִּין וּמְזוּזָה, יִקְנֶה תְּפִלִּין וְלֹא מְזוּזָה (יְרוּשַׁלְמִי סוֹף מְגִלָּה ובא"ח סי' נ"ח סי"ב), דְּמִצְוָה שֶׁהִיא חוֹבַת הַגּוּף עֲדִיפָא.
1 The reward and mitzva of mezuzah. Containing 2 paragraphs: It is a positive commandment to write the Shema, the Veyhaya Im-Shamoa, and to fix them on the side of one’s door, and one needs to be very careful in this, and all who are careful in this, their days will be lengthened, and the days of their children. And if one is not careful in this, his days will be shortened. Rema: And in any case, if it's out of his reach to acquir Tefillin and a Mezuzah, let him acquire Tefillin and not Mezuzah (Yerushalmi Megillah, end; O"C 38:12), as a mitzvah that is a bodily obligation is greater.
ב נְתִינָתָהּ בַּטֶּפַח הַחִיצוֹן. הַגָּה: יֵשׁ אוֹמְרִים כְּשֶׁאָדָם יוֹצֵא מִן הַבַּיִת יַנִּיחַ יָדוֹ עַל הַמְּזוּזָה (מהרי"ל שָׁם וּמוּכָח בַּעֲבוֹדַת כּוֹכָבִים דַּף י"א), וְיֹאמַר: ה' יִשְׁמֹר צֵאתִי וְכו' (בַּמִּדְרָשׁ). וְכֵן כְּשֶׁיִּכָּנֵס אָדָם לְבַיִת, יַנִּיחַ יָדוֹ עַל הַמְּזוּזָה.
2 Its placement is in the outer tefah. Rema: There are those who say that when a person leaves his house, he puts his hand on the Mezuzah there and says “God will guard my going, etc.” And so too when one enters a house, one puts his hand on the Mezuzah.