Second, these customs of etiquette were different between Palestine and Babylonia. Finally, synagogues and Houses of Study didn't require mezuzot. R. Papa said, One can learn from R. Huna's dictum that a room that has four doors requires four mezuzot. An arched doorway usually begins to narrow to a point toward the top third which makes it less than the required width to be defined as a doorway. Therefore, the Sages declared that it wasn't a true door.
All gates require a mezuzah.
Rather, said Abaye, it is due to a fear of danger. In truth, they said, the privy, the tannery, the bathhouse, the house for ritual immersion are exempt from a mezuzah. There are several selections which indicate that the purpose of the mezuzah is to protect the household and that having a mezuzah is an essential mitzvah. But when he leaves, he must not take it with him, unless it was leased from a Gentile, in which case he must remove it when he quits. It once happened that a man took it away with him, and he lost his wife and two children.