420. Landlords and Tenants
Tefillin, Mezuzah v’Sefer Torah 5:10
Everyone is obligated in the mitzvah of mezuzah, even women and slaves. Minors should be taught to attach mezuzos to their doorposts. One who rents a house outside of Israel is exempt from the mitzvah of mezuzah for thirty days; the same is true for one who rents a room in Israel. One who rents a house in Israel, however, must attach a mezuzah immediately.
Tefillin, Mezuzah v’Sefer Torah 5:11
When one person rents a house to another, the tenant is responsible to acquire a mezuzah and attach it, even if he would pay to have it done for him. This is because the mitzvah of mezuzah is incumbent on the person who lives in a house and not on the house itself. When a tenant departs, however, he should not take the mezuzah with him unless the house belongs to a non-Jew. If that is the case, then he should remove the mezuzah when he moves out.