Whenever the Messenger of Allah ﷺ entered the mosque, he would say, "In the name of Allah, and peace be upon the Messenger of Allah. O Allah, forgive me my sins and open for me the gates of Your mercy."And when he left, he would say, "In the name of Allah, and peace be upon the Messenger of Allah. O Allah, forgive me my sins and open for me the gates of Your bounty."
قال حدثنا أبو معاوية حدثنا ليث عن عبد الله بن الحسن عن فاطمة بنت حسين
كان رسول الله ﷺ إذا دخل المسجد قال بسم الله والسلام على رسول الله اللهم اغفر لي ذنوبي وافتح لي أبواب رحمتك وإذا خرج قال بسم الله والسلام على رسول الله اللهم اغفر لي ذنوبي وافتح لي أبواب فضلك