Customs of Elul
Beginning from Rosh Chodesh Elul until Yom Kippur we start blowing the shofar after the Shacharit morning prayers. There are places which also blow the shofar after the Ma’ariv evening prayers. (Rema, Orach Chaim 581:1)
In connection to the above the Ramban writes: I saw written in Pirkei D’Rebbi Eliezer (46) that Rabbi Yehoshua ben Levy says: Moshe was on Mount Sinai for forty days. On the seventeenth of Tammuz he broke the Tablets, and then spent forty days in the camp. And then, on Rosh Chodesh Elul,
The Kaf HaChaim, quoting the Rosh's accounting of the above Midrash, writes: “The Rabbis instituted blowing the shofar in order to encourage the Jewish People to do teshuva, as it is written, “Is the shofar ever sounded in the city and the people do not tremble? (Amos 3:6). It is also blown to prevent the Satan from mentioning the sins of the Jewish People. The Rosh writes that minhag Ashkenaz is to blow the shofar the entire month of Elul in the morning and evening after prayers. Among those who say selichot the entire month of Elul there are some who also blow the shofar the entire month during selichot when the thirteen attributes of mercy are read, in order to fulfill all opinions.”
Some begin blowing the shofar the first day of Rosh Chodesh, while others begin on the second day (Mishneh Berurah). The Magen Avraham writes that there is support for both customs, and that one should not change from his family custom. (Kaf HaChaim)
According to Iggrot Moshe (Orach Chaim 4 21:5), if the shofar was not blown after Shacharit it should be blown after Mincha, while Rav Elyashiv (Halichot VeHanhagot Tishrei p. 3) maintains that there is no shofar blowing after Mincha. Likewise, according to Rav Elyashiv one who prays alone does not need to blow the shofar.
The Mishneh Berurah writes that it was the custom in his country to recite “L’David Ori” (Psalm 27) every day after prayer in the morning and evening from Rosh Chodesh Elul until Yom Kippur. Kaddish is also recited afterwards. After stating the custom to recite the Psalm until Yom Kippur, he writes: “We have the custom to recite the Psalm until after Shemini Atzeret.” Though the Shulchan Aruch does not mention the custom of reciting this Psalm, Rabbi Ovadia Yosef writes in Chazon Ovadia that it is a good custom to recite it after prayers each morning from Rosh Chodesh Elul until Hoshana Rabba.