1) HALACHAH: DO MITZVOS NEED KAVANAH
OPINIONS: The Gemara earlier (28b) quotes Rava who says that "Mitzvos do not need Kavanah." This means that when one performs an act of a Mitzvah, he does not need specific intent to fulfill the Mitzvah. Accordingly, Rava rules that one who was forced against his will to eat Matzah on Pesach night fulfills the Mitzvah.
The Gemara here (29a), however, relates that Rebbi Zeira told his assistant to have him in mind when he blows the Shofar. Rebbi Zeira apparently disagrees with Rava and maintains that Mitzvos need Kavanah. According to Rava, as long as the Ba'al Toke'a blows the Shofar properly (and not with short, barking sounds) and the person listening knows that the sounds he hears come from a Shofar, he fulfills the Mitzvah even though neither he nor the Ba'al Toke'a have Kavanah to fulfill the Mitzvah.
What is the Halachah in practice? Must one have Kavanah in order to fulfill a Mitzvah?
(a) The ROSH and BEHAG (and as implied by the words of the RIF) rule that the Halachah follows Rebbi Zeira, because the Beraisa says explicitly that if the listener had Kavanah and the Ba'al Toke'a did not have Kavanah, the listener does not fulfill his obligation. The Beraisa says that only when both have Kavanah does the listener fulfill the Mitzvah. Although the Gemara (28b) explains that, according to Rava, the Beraisa means that the listener and Ba'al Toke'a do not fulfill the Mitzvah because the Ba'al Toke'a did not blow proper Teki'os at all (rather he made short, barking sounds), the simple understanding of the Beraisa supports Rebbi Zeira's opinion. Moreover, the Yerushalmi proves from the Beraisa that one must have Kavanah in order to fulfill the Mitzvah. Since both the Yerushalmi and the simple understanding of the Beraisa support the opinion of Rebbi Zeira, these Rishonim rule in accordance with his view.
(b) The MAHARITZ GE'AS (cited by the TUR OC 569), RABEINU CHANANEL, and the BA'AL HA'ME'OR rule like Rava that Mitzvos do not need Kavanah. Even though the Beraisa says that the blower does not fulfill the Mitzvah when he does not have Kavanah to fulfill it, the Beraisa refers to when he did not blow proper Teki'os, as the Gemara explains earlier according to Rava.
(c) RAV SHERIRA GA'ON and the RAN (cited by the DARCHEI MOSHE OC 475:6) maintain that l'Chatchilah one must have Kavanah in order to fulfill a Mitzvah, as Rebbi Zeira says. However, b'Di'eved one fulfills the Mitzvah even without Kavanah, as Rava says. Therefore, one who did not have Kavanah when he performed the act of a Mitzvah is not required to repeat the act.
(d) The BA'AL HA'ME'OR quotes "Yesh Mefarshim" who explain that Rebbi Zeira and Rava do not argue at all. Both maintain that Mitzvos do not need Kavanah. Rebbi Zeira merely requires that the Ba'al Toke'a have Kavanah that he is blowing the Shofar so that another person can hear it. He does not need to have Kavanah to fulfill the Mitzvah. This may also be the opinion of the RAMBAM who cites the statements of both Rava and Rebbi Zeira as the Halachah.
(e) The RAN understands the RAMBAM differently. He explains that the reason why the Rambam rules that both the listener and the Ba'al Toke'a must have Kavanah to fulfill the Mitzvah (Hilchos Shofar 2:4) is because he maintains that Mitzvos need Kavanah. Why, then, does the Rambam in Hilchos Chametz u'Matzah (6:3) write that one who was forced to eat Matzah on Pesach night fulfills the Mitzvah? The answer is that the Rambam maintains that a Mitzvah that involves eating (Achilah) differs from other Mitzvos and one fulfills the Mitzvah even when he does not have Kavanah. Since one's body derives pleasure from the act of eating whether or not he has intention to derive pleasure, he fulfills the Mitzvah just as one who is forced to eat a forbidden food transgresses an Aveirah. (This is in accordance with the logic that Rashi suggests at the end of 28a.)
(It is not clear, however, how the Ran understands the Rambam's words in Hilchos Keri'as Shema (2:1), that one who reads the Shema without Kavanah fulfills the Mitzvah (even though there is no physical pleasure involved).)
1. The SHULCHAN ARUCH (OC 60:4) records the first two opinions and concludes that the Halachah follows the opinion of the ROSH and BEHAG who rule that Mitzvos need Kavanah. Therefore, one who performed an act of a Mitzvah and did not have Kavanah to fulfill the Mitzvah must repeat the Mitzvah. However, he may not recite a blessing when he repeats the Mitzvah because other Rishonim rule that Mitzvos do not need Kavanah and he fulfilled the Mitzvah the first time. (MISHNAH BERURAH OC 60:9)
The MAGEN AVRAHAM cites the RADBAZ who says that this ruling applies only to Mitzvos d'Oraisa. For Mitzvos d'Rabanan one does not need to repeat the Mitzvah if he did not have Kavanah the first time. The VILNA GA'ON (OC 489), however, disagrees and rules that Mitzvos d'Rabanan also need Kavanah.
With regard to a Mitzvah that involves eating, such as the Mitzvah to eat Matzah or to eat in a Sukah, the Poskim are lenient because the Rambam (according to the Ran in (e) above) writes that in such a case one fulfills the Mitzvah even without Kavanah (BI'UR HALACHAH OC 60, DH v'Yesh Omrim).
2. However, the BI'UR HALACHAH (based on the Ramban in Milchamos) writes that when a person is "Mis'asek" in the performance of a Mitzvah (he is not aware that the act he does is an act of a Mitzvah), he does not fulfill the Mitzvah according to any of the opinions above; he must repeat the Mitzvah and recite a blessing. For example, if a person picks up a Lulav on the first day of Sukos but does not know that it is Sukos or that the Lulav is valid, or if he eats Matzah on the first night of Pesach but does not know that it is Pesach or that the food is Matzah, he certainly does not fulfill the Mitzvah.
Another case in which one certainly does not fulfill the Mitzvah because of lack of intent is when he specifically has in mind not to fulfill the Mitzvah with his act. (MISHNAH BERURAH OC 60:9, based on Rabeinu Yonah in Berachos and others)
Conversely, there is no question that one does fulfill the Mitzvah when he performs the action in the context of the performance of a Mitzvah, even though he did not have specific intent that his act was done for the purpose of the fulfillment of Hash-m's will (CHAYEI ADAM #68, based on Tosfos in Sukah, as cited by the MISHNAH BERURAH OC 60:10). In this case he is considered to have had Kavanah since the context of his action shows that it was done for the sake of the Mitzvah. (For this reason, it is not necessary to recite the passage of "l'Shem Yichud" in order to fulfill the Mitzvah.)
3. The BI'UR HALACHAH adds that the rule that Mitzvos need Kavanah ("Mitzvos Tzerichos Kavanah") applies even to Mitzvos that are not obligatory, such as Tzitzis (if one does not wear a four-cornered garment he has no obligation to wear Tzitzis) and Sukah (other than the first night, if one does not want to eat he has no obligation to sit in a Sukah). If one wears Tzitzis without intent to fulfill the Mitzvah of Tzitzis, not only does he not fulfill the Mitzvah, but he violates the Mitzvas Aseh by wearing a four-cornered garment without Tzitzis! Due to this concern, the Mishnah Berurah recommends that when one is called to the Torah for an Aliyah or other honor and he rapidly dons a Talis, he should borrow a Talis from his friend and not wear the synagogue's public Talis. A borrowed Talis is exempt from Tzitzis, while the synagogue's Talis is considered the property of everyone who wears it. Since he is rushed he might not remember to have intent to fulfill the Mitzvah of Tzitzis, and thus he should use a borrowed Talis which is exempt from Tzitzis.
(This application of "Mitzvos Tzerichos Kavanah" to non-compulsory Mitzvos is not unanimous. The MINCHAS CHINUCH (386) writes that when one sits in a Sukah built with stolen Sechach, he does not fulfill the Mitzvah of Sukah because his act is a "Mitzvah ha'Ba'ah b'Aveirah." Nevertheless, he also does not transgress the Mitzvas Aseh not to eat outside of a Sukah, since, in practice, he is sitting in a Sukah. According to the Minchas Chinuch, one does not transgress the Mitzvah of Sukah or Tzitzis unless he physically sits outside of a Sukah or does not have strings of Tzitzis on his garment. If he performs the act but does not fulfill the Mitzvah because of a different reason, he does not necessarily violate the Mitzvas Aseh.)
2) THE SPECIAL STATUS OF YERUSHALAYIM
QUESTION: The Mishnah states that in the times of the Beis ha'Mikdash -- when Rosh Hashanah would coincide with Shabbos -- they would blow the Shofar only in the Beis ha'Mikdash itself. After the Churban, Rebbi Yochanan ben Zakai decreed that they blow the Shofar in Yavneh (according to Rebbi Elazar) or in all cities that have a Beis Din (according to the Tana Kama). The Mishnah adds that Yerushalayim's status was superior to that of Yavneh in that even the cities near Yerushalayim were permitted to blow the Shofar on Shabbos of Rosh Hashanah.
The first part of the Mishnah implies that during the times of the Beis ha'Mikdash the Shofar was blown only in the Beis ha'Mikdash and nowhere else, not even in Yerushalayim (as Rashi says). However, this apparently contradicts the end of the Mishnah which says that when they blew the Shofar in Yerushalayim, nearby cities also blew the Shofar. If, before the Churban, they blew the Shofar only in the Beis ha'Mikdash, and, after the Churban, they blew the Shofar in all cities with a Beis Din, at what point in time did they blow in Yerushalayim such that the city had an elevated status?
(a) TOSFOS (DH Aval Lo) and the RA'AVAD (Hilchos Shofar 2:8) explain that the Mishnah refers to Yerushalayim after the Churban. When Rebbi Yochanan ben Zakai enacted his decree after the Churban, not only did he enact that the Shofar should be blown in every city that has a Beis Din (or in Yavneh, according to Rebbi Elazar), he also decreed that Yerushalayim should have a special status and that all cities near Yerushalayim should also blow the Shofar even if they do not have a Beis Din. The special status of Yerushalayim was part of Rebbi Yochanan ben Zakai's decree.
The RITVA asks that according to this explanation, Rebbi Yochanan ben Zakai actually made two decrees with regard to blowing the Shofar on Shabbos after the Churban: first, he decreed that they should blow the Shofar in every city that has a Beis Din, and, second, he decreed that they should blow the Shofar in cities close to Yerushalayim. Since these are clearly two separate decrees, why does the Gemara later (31a) count them as only one decree? The Gemara implies that he enacted only one decree -- to blow the Shofar in cities that have a Beis Din; Yerushalayim was not afforded special status by Rebbi Yochanan ben Zakai. According to the Gemara, at what point did Yerushalayim have a special status?
Moreover, if the Mishnah refers to the status of Yerushalayim after the Churban, why should it be afforded more distinction than Yavneh? All of the Chachamim were in Yavneh, as was the Beis Din ha'Gadol, while Yerushalayim itself was virtually desolate.
(b) The RITVA and MAHARSHA answer that Yerushalayim's special status existed before the Churban but after the Beis Din ha'Gadol left the Lishkas ha'Gazis and moved into the city proper. Since the Beis Din moved into Yerushalayim, a special enactment was made (not by Rebbi Yochanan ben Zakai) that the Shofar be blown in Yerushalayim on Shabbos of Rosh Hashanah and not in the Beis ha'Mikdash, and that the cities surrounding Yerushalayim should also blow the Shofar on Shabbos.
Hence, there were three stages in the blowing of the Shofar on Shabbos of Rosh Hashanah. The first stage was when the Shofar was blown only in the Beis ha'Mikdash. The second stage was after the Beis Din ha'Gadol left the Lishkas ha'Gazis; during this period, the Shofar was blown in Yerushalayim and nearby cities. The third stage was after the Churban, when Rebbi Yochanan ben Zakai decreed that the Shofar should be blown in every city that has a Beis Din.
(c) The RAMBAM (Hilchos Shofar 2:8), RAMBAN, and TOSFOS YESHANIM explain that when the Mishnah says that they blew the Shofar "in the Mikdash," it does not refer to the Beis ha'Mikdash alone. It refers to the Beis ha'Mikdash as well as Yerushalayim. Even though the term "Mikdash" normally refers only to the Beis ha'Mikdash and not to Yerushalayim (such as in the Mishnah later, 30a), in this Mishnah it includes Yerushalayim.
The Rambam (in Perush ha'Mishnayos) adds that every time the Mishnah uses the term "Mikdash" it refers to both the Beis ha'Mikdash and Yerushalayim. When the Mishnah later (30a) states that the Lulav was held for seven days in the "Mikdash," the Rambam explains that "Mikdash" there means that it was held for seven days throughout the entire city of Yerushalayim. (See also Insights to Sukah 42:2:b.)
(d) The RAMBAN (Derashos, p. 444) suggests another answer. The original enactment indeed was to blow the Shofar on Shabbos only in the Beis ha'Mikdash and not in Yerushalayim. The cities near Yerushalayim, however, also blew the Shofar. There was no need to institute the blowing of the Shofar in Yerushalayim itself because the people there could simply go to the Beis ha'Mikdash to hear the Shofar. This is what the Mishnah means when it says that Yerushalayim had a special status over Yavneh; it refers to Yerushalayim's status before the Churban.
The Ramban asserts that this is also the intention of Rashi who writes that the "Mikdash" does not include Yerushalayim, but they still blew in the surrounding cities (before Yerushalayim was destroyed).