Our teacher, the Beit Yosef, wrote: It is the custom to spill all the drawn water in the neighborhood of the deceased. Thus far his words. And "neighborhood" means two houses besides the house of the deceased. The early authorities wrote the reason: in order that they should know that someone died, and they will not need to say it verbally because of "one who brings an evil report," etc. And there is an allusion to this: "And Miriam died there, and there was no water for the congregation." According to this, on Shabbat and Yom Tov it is forbidden to spill, for then it is forbidden to announce any sorrow. And so is the simple custom among us, not to spill the water on Shabbat and Yom Tov. And also according to this reason, there is no obligation to spill all the water, obviously. The source of the law is from the Kol Bo, and he wrote this as the primary reason. And afterwards he wrote: And some say that the reason is because the Angel of Death drops a drop of the poison of death into the water. And they brought another incident regarding this, see there. Certainly this reason is secondary to the first reason, and I wonder at those who are very stringent in this as if it were an explicit Gemara. And there are those who wish to forbid cooked food if they cooked it with the water, and this is nothing but a matter of wonder. Behold, even regarding dangers explained in the Gemara, our sages, of blessed memory, also said: And now that many have trodden upon it, "The Lord preserves the simple" (end of the eighteenth chapter of Shabbat 129b and Yevamot 72b), and all the more so in a matter such as this. And what shall the large cities do, where in three courtyards hundreds of householders are found? And what shall the poor person do in the winter when it is difficult to obtain water? Therefore, it appears in my humble opinion to be very lenient in the matter, and so I have seen from the great authorities of instruction. And during the winter time when the water is covered, and likewise if there is trouble to obtain the water and they are covered, one should be lenient. And on Shabbat and Yom Tov one should not spill at all. And any water that is for a mitzvah—"one who keeps a mitzvah shall know no evil thing." (And one must be careful at the time of death that a limb does not extend outside the bed, and those standing there shall see and supervise this. And it is proper that they occupy themselves with words of holiness, as was written in the book Ma'avar Yabbok.)
כתב רבינו הבית יוסף: מנהג לשפוך כל המים שאובים שבשכונת המת. עד כאן לשונו. ו"שכונה" הוא שני בתים לבד בית המת. והטעם כתבו הקדמונים: כדי שידעו שמת, ולא יצטרכו להגיד בפה משום מוציא דיבה וכו' ורמז לזה: "ותמת שם מרים ולא היה מים לעדה". ולפי זה בשבת ויום טוב אסור לשפוך, דאז אסור להודיע שום צער. וכן המנהג הפשוט אצלנו לבלי לשפוך המים בשבת ויום טוב. וגם לטעם זה אין חיוב לשפוך כל המים כמובן. ומקור הדין מהכלבו, וכתב לעיקר הטעם הזה. ואחר כך כתב: ויש אומרים כי הטעם לפי שמלאך המות מפיל במים טיפת סם המות. והביאו עוד מעשה לזה, עיין שם. ובוודאי טעם זה טפל לטעם הראשון, ותמיהני על כמה שמחמירים בזה הרבה כאילו היא גמרא מפורשת. ויש שרוצים לאסור התבשיל אם בשלו בהמים, ואין זה אלא דברי תימה. והרי אפילו בסכנות המבוארים בגמרא אמרו חכמינו ז"ל גם כן: והאידנא דדשו בו רבים "שומר פתאים ה'" (סוף פרק שמונה עשר דשבת קכט ב (שבת קכט ב) ויבמות עב ב), וקל וחומר במילתא כי האי. ומה יעשו הערים הגדולות שבשלוש חצרות ימצאו מאות בעלי בתים? ומה יעשה העני בחורף שבכבידות להשיג מים? ולזה נראה לעניות דעתי להקל הרבה בדבר, וכן ראיתי מגדולי הוראה. ובזמן החורף כשהמים מכוסים, וכן אם יש טורח להשיג המים והמה מכוסים, יש להקל. ובשבת ויום טוב אין לשפוך כלל. וכל מים שהם למצוה – שומר מצוה לא ידע דבר רע. (ויש ליזהר בשעת מיתה שלא יצא אבר חוץ למיטה, והעומדים שם יראו וישגיחו על זה. ונכון שיתעסקו בדברי קדושה, כמו שכתב בספר מעבר יבק.)