Places that require a mezuzah.
These are the places that require a Mezuzah, all the same:
• Whether the gates of the houses, or the gates of the courtyards, states and cities, [all are the same].
• The cowshed of cattle, and the pen, and the storehouses of wine and oil.
• A woman's house [or room] and the house of the Jewish housemates.
They are all obligated. (Rema: Specifically when the housemates are Jewish. But the house of a Jew and an idolator, is exempt from a Mezuzah (Mordekhai on Avodat Kokhavim ch. 1 end). Also the courtyards of cities where some idol worshippers live are exempt from Mezuzot (Chidushei Agudah on Yoma, ch. 1).
A house/room for straw, wood, livestock — require. But if women bathe there, since they stand there naked, it is not proper regard of Heaven for a mezuza to be there. (Rema: Only these specifically. But an actual [living] room, even if man and woman sleep and have relations there — requires mezuzah (in Responsa Maharil and the same wrote the BY) And some are lenient and say wherever women lie is exempt from mezuzah (BY in the name of Semak, the Kol Bo, and Mordekhai Hilkhot Mezuza end.) It seems to me wherever the door is from the [room's] inside and when people sleep there they close the door, and a doorpost is found outside it — it requires by all opinions. (ד"ע in Darkhei Moshe. And thus it seems in Teshuvat Maharil #98).
A synagogue, if there is an apartment for anyone, requires a Mezuzah. Rama: And if there is an apartment in the courtyard that is in front of the synagogue, the courtyard needs a Mezuzah but the synagogue is exempt. (BY in the name of Rabbeinu Yerucham)
A bathroom and a bathing house and a tannery and a Mikvah, they are exempt, since they are not made to be honorable dwelling places. (BY in the name of Rabbeinu Yerucham)
Where there's filth e.g. if there are babies there, it's better to cover the mezuzah. In a clean place it's better to have it visible.
An akhsadra (< Gr. exedra) (porch), which is a space with three walls and a roof, even though it has two uprights on the fourth side petzimin, the akhsadra is exempt, because the petzimin are made to support the roof and not for the sake of mezuzoth/doorposts. (Quoting Rambam: Sefer Torah 6:3) But if it has a wall on the fourth side as well, even if it is low or is composed of many windows, then it requires.
A balcony that is a path to go up some stairs, and hallway [beith sha`ar], and a garden, is exempt. But if the house opens to one of these, it requires.
(And some say a hallway [beith sha`ar] requires one even if the house does not open to it (Tur and the poskim in the name of R"Y).
A gatehouse (hallway) that opens to a room and to a yard, needs two mezuzot: one where it open to the room and one where it opens to the yard.
A gatehouse (hallway) between a garden and house needs two mezuzot: one where it opens to the room and one where it opens to the garden.
A Beit Midrash does not need a Mezuzah, but if there is in it an entrance that you regularly use to go to your house, it needs a Mezuzah. And there are those who say that a Beit Midrash does need a Mezuzah and it is correct to be concerned about their words, but one should not make a blessing on it.
A Sukkah during its holiday, a room in a boat, and stores in the marketplace, are exempt.
Two potter's huts one inside the other, the inner one requires and the outer one is exempt. [Sukkah 8b]
A house/room that hasn't 4 amot by 4 amot, is exempt. But if it's able to cover 4 amot by 4 amot in equivalent area, even though it's longer than wide, or is round or has five corners, it requires. (Rambam ibid. :2)
An unroofed room is exempt. If part roofed and part unroofed, if the roofing is by the entrance, it requires mezuzah, provided 4 amot [square] are roofed.
A house even if it has no doors requires mezuzah. But some exempt it.
If there are many rooms, one in front of another, they all need Mezuzot.
If there are many entrances in the house that are open to the yard or to a public domain and each one is used as an entrance and an exit for the people of the house, they all need Mezuzot, even if the number of residents has declined such that its residents normally only exit and enter through one of them.
A house that has many doorways, even though he normally only exits and enters through one of them one, he is required to make a Mezuzah on each one.
Rema: Since they are made for entry and exit. (Thus seems to say the Tur)
A cellar that has an entry from the street, where they bring in wine in large barrels and it has a doorway from the house through which they enter and exit it constantly: If the small doorway [inside] is fit to have a mezuzah, then it requires it and the large doorway [outside] is exempt. But if the small one is not fit to have a mezuzah, then the large one requires it and the small one is exempt (BY in the name of an Ashkenazi responsum, which is found in Responsae Maharil #99).
A chute that extends from a house/room to an upper floor, in which people go up on a ladder, and the ladder is surrounded by walls, sometimes below at the base of the ladder or sometimes above at its top, and it has a tzurath hapetach/doorway at [either] end, it requires. And if they made a [tzurah] above and below, both require.
An entrance that is behind a door -- if its boards are tefach [past the door], it requires a mezuzah. [Menachot 33b]
An entrance that consists partially of a pillar between [two rooms] — as long as the hinge can be recognized from each side of the pillar, behold they're like two doorways, and each doorway needs a mezuzah. But so long as there's no hinge alongside the pillar, the pillar does not divide it [the doorway] into two [doorways], as it's just decorative.
One who rents a house/room outside the Land, or one who lodges at an inn in Eretz Yisrael/ the Land of Yisrael, is exempt from Mezuza for thirty days. But one who rents a house/room in Eretz Yisrael requires Mezuza immediately, due to [the mitzwah of] yeshuv (dwelling in) Eretz Yisrael. (And this is the law for someone who borrows a house; the law is like the renter.) (BY in the name of R' Manoah [Manoah B. Jacob?] and so it seems in Shas)
One who rents a house from a non-Jew is obligated in the mitzvah of Mezuza [for that house].