Siman 377
Presented here for study, not as a practical ruling. The Shulchan Aruch rules by Sephardi custom, the Rema's glosses by Ashkenazi custom, and the Kitzur follows Ashkenazi custom. For a practical question, ask your rabbi.
א הָעֲבָדִים וְהַשְּׁפָחוֹת, אֵין עוֹמְדִין עֲלֵיהֶם בְּשׁוּרָה, וְאֵין אוֹמְרִים עֲלֵיהֶם תַּנְחוּמֵי אֲבֵלִים, אֶלָא אוֹמְרִים לוֹ: הַמָּקוֹם יְמַלֵא חֶסְרוֹנְךָ, כְּשֵׁם שֶׁאוֹמְרִים לְאָדָם עַל שׁוֹרוֹ וַחֲמוֹרוֹ.
1 For male and female slaves no line [of comforters] is made, nor is consolation offered [to their master], but they say to him, 'May the Lord replace your loss,' even as they say to a man regarding his ox and his ass, ['May the Lord replace your loss'].
ב אָבֵל מְנֻדֶּה, אֵין מַבְרִין אוֹתוֹ וְאֵין אוֹמְרִים לוֹ תַּנְחוּמֵי אֲבֵלִים.
2 A mourner who is an excommunicant must not be provided with the mourner's meal, nor is consolation offered to him.
ג מְנֻדֶּה שֶׁמֵּת, מְנַחֲמִים אֲבֵלָיו.
3 [If] an excommunicant died, his mourners may be offered consolation.