عَنْ سُلَيْمَانَ بْنِ بُرَيْدَةَ عَنْ أَبِيهِ (بُرَيْدَةَ الْأَسْلَمِيِّ رَضِيَ اللَّهُ عَنْهُ) قَالَ: كَانَ رَسُولُ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ يُعَلِّمُهُمْ إِذَا خَرَجُوا إِلَى الْمَقَابِرِ، فَكَانَ قَائِلُهُمْ يَقُولُ: السَّلَامُ عَلَيْكُمْ أَهْلَ الدِّيَارِ مِنَ الْمُؤْمِنِينَ وَالْمُسْلِمِينَ، قَالَ مُعَاوِيَةُ فِي حَدِيثِهِ: إِنَّا إِنْ شَاءَ اللَّهُ بِكُمْ لَاحِقُونَ، أَنْتُمْ فَرَطُنَا وَنَحْنُ لَكُمْ تَبَعٌ، وَنَسْأَلُ اللَّهَ لَنَا وَلَكُمُ الْعَافِيَةَ
It is narrated from Sayyiduna Buraidah Aslami (may Allah be pleased with him) that when they would go towards the graveyard, the Prophet (peace and blessings be upon him) used to teach them to recite this supplication: "Peace be upon you, O inhabitants of these dwellings, from among the believers and the Muslims. Indeed, we, if Allah wills, will join you. You have preceded us and we are following after you. And we ask Allah for well-being for us and for you." (O dwellers of these homes, O believers and Muslims! Peace be upon you. We too, if Allah wills, are to meet you. You have gone ahead of us and we are coming after you. We ask Allah for well-being for ourselves and for you.)