סימן קצח סעיף ב
בִּכְפָר קָטָן, אִם יֵשׁ שָׁם מֵת, אֵין שׁוֹאֲלִין בְּשָׁלוֹם זֶה לָזֶה, וּמִכָּל שֶׁכֵּן שֶׁאֵין שׁוֹאֲלִין בְּשָׁלוֹם בְּבֵית הַקְבָרוֹת, כְּשֶׁיֵּשׁ שָׁם מֵת, אֲפִלּוּ בְעִיר גְּדוֹלָה. אֲבָל כְּשֶׁאֵין שָׁם מֵת, שׁוֹאֲלִין בְּרִחוּק אַרְבַּע אַמּוֹת מִן הַקְּבָרִים.
If a death occurs in a small village, the inhabitants should not exchange greetings; and certainly one should not extend greetings in a cemetery, when the deceased is there, awaiting burial. This applies even in a large city. But if there is no deceased awaiting burial, greetings may be exchanged at a distance of four amos from the graves.
תנא דבי אליהו כל השונה הלכות בכל יום מובטח לו שהוא בן העולם הבא שנאמר הליכות עולם לו אל תקרי הליכות אלא הלכות (נדה ע"ג.)