*Majority of achronim accept the Maharil. Taz 289:3, Maharam Shik 287, Maharsham 1:71 and 3:154, Chelkat Yakov YD 162, Yeshuot Malko (Mezuzah 6:1), Igrot Moshe YD 1:181, Or Letzion YD 1:14, and Yabia Omer YD 4:23:6 agree with Maharil in this case. Binyan Tzion (cited by Chelkat Yakov) and Chazon Ish YD 168:5 agree with Bet Meir.
*Or Letzion YD 1:14 write that the opinion of the Maharil depends on the dispute between the Rambam and Rosh. According to the Rambam that a bet shaar is obligated because of the house that it is attached to the mezuzah should be on the left side and according to the Rosh the rabbinic obligation is for the bet shaar itself and accordingly the mezuzah should be on the right. Or Letzion concludes to place the mezuzah on the right because either we follow the Rosh or the Chikrei Lev. Yeshuot Malko (Mezuzah 6:1) advances the same argument. However, both Or Letzion and Yeshuot Malko conclude that we accept the Maharil. Igrot Moshe YD 1:181 rejects the entire question and explains that the Rambam would hold that the bet shaar is obligated in it of itself once it is attached to a place that is used for living. He accepts the Maharil. Our summary is that most accept the Maharil in this case and would hold to put up the mezuzah on the right side.</ref>
##If a closet is exempt from mezuzah should it have a mezuzah going from the exempt area into the room since it is like an entrance to the room? Most Ashkenazim hold that a mezuzah is placed on the left side going into an area that is exempt, while Sephardim hold that the mezuzah is placed on the right side. <ref>Rabbi Akiva Eiger 286:13 writes that since the area is exempt from a mezuzah it can still be considered an entrance into the room. The Chazon Ish YD 168:5 agrees and adds that accordingly the mezuzah should be placed on the left side going from the exempt area into the room. Rav Shlomo Zalman (cited by Hamezuzah Vehilchoteha ch. 3 fnt. 19), [http://www.yutorah.org/sidebar/lecture.cfm/788640/rabbi-hershel-schachter/the-laws-of-mezuzah/ Rav Hershel Schachter in “The Laws of Mezuzah” (min 34-42)], Binyan Tzion 99, and Rav Heinemann (Star-K Kashrut Kurrents Winter 5779 p. 2) agree.
*However, the Chikrei Lev YD 129 argues that since the area is exempt in it of itself it is never considered an entrance just because you can enter it and then while exiting it enter into another room. That is considered an exit and not entering. Or letzion YD 1:14 isn’t certain if the Chikrei Lev is correct but he certainly considers his opinion significant. Yabia Omer 4:23:6 is also uncertain of Rabbi Akiva Eiger and cites Tzur Yakov and Tarshish Shoham quoting Lechem Hapanim who disagree with Rabbi Akiva Eiger. Igrot Moshe YD 1:181, Agur Bohalecha p. 739-740, Chesed Lavraham YD 91, and R’ Simon all agree with Chikrei Lev and reject Rabbi Akiva Eiger.</ref>
#Therefore, a closet that is 4x4 amot or larger clearly needs a mezuzah and the mezuzah is placed on the right side going into the closet.<ref>Shulchan Aruch YD 286:2</ref>