If one rents a residence for no specified period of time, he is not required to place mezuzot on the door until he has lived in the residence for thirty days. At that point, he must affix the mezuzot with a berachah. If he chooses to place Mezuzot within the first thirty days of living in the residence, then he does not recite a berachah. In such a case, the renter is not required to remove the mezuzot and then reaffix them after thirty days had passed. This is the ruling of Ha’Rav Ovadyah Yosef (a”h).
However, the Ben Ish Chai (a”h) states that this applies only if the contract did not specify the duration of the rental agreement. If it was agreed from the outset that the tenant would rent the apartment for a period of thirty or more days, then the tenant must put mezuzot on all the doorframes immediately when he moves in. In light of the different opinions that exist, he should not recite a berachah when affixing the Mezuzot.
This halachah is very relevant to those who rent vacation homes for the summer. If one signs a rental contract for thirty days or longer, then he is required to put Mezuzot on all the doorframes in the summer home immediately when he moves in. It makes no difference whether he rents the residence from a Jew or gentile. Generally, people who rent a summer home do so for the entire season, 2-3 months. In such cases, they must ensure to place Mezuzot as soon as they move in to the residence.
It should be noted that this entire discussion relates to a rented summer home. If one purchases the summer home, one must put Mezuzot immediately, with a berachah.