Q. I learned that an avel is prohibited in giving and even returning greetings. Is it permitted for the visitors to the home of one in mourning to greet each other? Is a comforting hug between non-aveilim permitted?
A. Aruch Hashulchan (Y.D. 343: 4) writes that at the mourners home people should not exchange greetings. Since it is a place of sadness and sorrow, it is not correct to display and show that one is at peace and harmony. Even Yaakov (55), mentions that it may be considered ‘loeg larosh,’ or mocking the unfortunate. See also Sefer Hapardes (Avelus p. 22), Shibulei Haleket (Smochos 22), Nitei Gavriel (Avelus 89: 1) and others. However, some Poskim are lenient. (Even Yaakov 55, Yabia Omer 4: 33: 1, Yalkut Yosef 7: p. 142)
Mourning in Halacha (10: n. 3) writes: It is reported that Hagaon R’ M. Feinstein zt’l. would not even extend his hand in greeting while in the home of a mourner.
Horav Shlomo Miller’s Shlit’a opinion is similar. However, the Rov maintains that greetings where there is no asking or replying about peace and welfare or when not expressing that times are good, such as a simple hug, are permitted.
Rabbi A. Bartfeld as revised by Horav Shlomo Miller Shlit’a