Who must affix a mezuzah, and with what intention?
All adults, men and women, have a Biblical obligation to affix a mezuzah to the right doorpost of each doorway of their home, including the garage. Their intention should be to fulfill the mitzvah of mezuzah. Although the text mentions its protective effect, protection is not its primary purpose; some authorities prohibit consciously affixing it for protection because a mitzvah should be performed to fulfill God's will.
A practical halachic question: the final ruling is for your rabbi.
Quote from the source«Such an intention detracts from the essential character of a mitzvah, which is to fulfill Hashem’s will with no other considerations.»
- Author
- Rabbi Doniel Neustadt
- Source
- Parsha.net — KiSisa69, p. 7