Greeting toxic people with the salam
Muslims are advised to greet those they know and don't know, and they are obligated to return the salam of other Muslims.
But what happens when a person is toxic to you, or damages your trust? This case is an exception to the rule.
Islam permits a Muslim to cut off toxic people and family members who seriously seek to harm your religion, well-being or health.
وَأَجْمَعَ الْعُلَمَاءُ عَلَى أَنَّهُ لَا يَجُوزُ لِلْمُسْلِمِ أَنْ يَهْجُرَ أَخَاهُ فَوْقَ ثَلَاثٍ إِلَّا أَنْ يَكُونَ يَخَافُ مِنْ مُكَالَمَتِهِ وَصِلَتِهِ مَا يُفْسِدُ عَلَيْهِ دِينَهُ أَوْ يُوَلِّدُ (بِهِ) عَلَى نَفْسِهِ مَضَرَّةً فِي دِينِهِ أَوْ دُنْيَاهُ فَإِنْ كَانَ ذَلِكَ فَقَدْ رُخِّصَ لَهُ فِي مُجَانَبَتِهِ وَبُعْدِهِ وَرُبَّ صَرْمٍ جَمِيلٍ خَيْرٌ مِنْ مُخَالَطَةٍ مُؤْذِيَةٍ (قَالَ الشَّاعِرُ ... إِذَا مَا تَقَضَّى الْوُدُّ إِلَّا تَكَاشُرًا ... فَهَجْرٌ جَمِيلٌ لِلْفَرِيقَيْنِ صَالِحُ)
[التمهيد - ابن عبد البر - الجزء ٦ - الصفحة ١٢٧]
Ibn Abdul-Barr said:
“The scholars are unanimous that it is not permissible for a Muslim to leave his brother for more than three days, except if he fears that communicating with him or maintaining contact would corrupt his religion or cause him harm in his religion or worldly affairs. In such a case, he is permitted to keep his distance and avoid him.
And sometimes a proper severance is better than harmful interaction. As the poet said: ‘When connection no longer remains except in the form of hostility, then a graceful separation is best for both parties.’”
[Al-Tamheed - Ibn Abdul-Barr - Volume 6 - Page 127]
This means that you wouldn't be required to greet or interact with a toxic individual at all. The same applies to innovators. When there is a possibility of protecting yourself from harm, Allah would not prevent you from doing so, for He is the Most Compassionate and the Most Just.
٢٥٤٦٤ - حَدَّثَنَا وَكِيعٌ، عَنْ عَبْدِ اللَّهِ بْنِ عَامِرٍ، عَنِ الزُّهْرِيِّ، أَنَّ رَجُلًا سَلَّمَ عَلَى النَّبِيِّ ثَلَاثَ مَرَّاتٍ , فَلَمْ يَرُدَّ عَلَيْهِ , فَقِيلَ لَهُ: لِمَ؟ فَقَالَ: «إِنَّهُ ذُو وَجْهَيْنِ»
[مُصَنَّفُ ابْنِ أَبِي شَيْبَةَ – الحديث ٢٥٤٦٤]
A man gave salam to the Prophet ﷺ three times, but he did not return his greeting. It was said to him, “Why?” He replied, “He is two-faced.”
[Musannaf Ibn Abi Shaybah - Hadith 25464]
It is even permissible not to return the greeting of someone who has partially damaged your trust. But once that trust is restored, returning the salam becomes obligatory again.
• حدثنا محمد بن أحمد بن الحسن ثنا أبو إسماعيل الترمذي ثنا عبد العزيز ابن عبد الله الأويسي ثنا مالك بن أنس: أن ابن شهاب سأله بعض بني أمية عن سعيد بن المسيب فذكره له وأخبره بحاله، فبلغ ذلك سعيد بن المسيب فقدم ابن شهاب فجاء يسلم على سعيد فلم يكلمه سعيد ولم يرد عليه، فلما انصرف سعيد مشى معه ابن شهاب. فقال: ما لي سلمت عليك فلم تكلمني؟ ما بلغك عني إلا خير؟ قال: لم ذكرتني لبني مروان؟.
[حِلْيَةُ الأَوْلِيَاءِ – المُجَلَّدُ ٣ – الصَّفْحَةُ ٣٦٦]
Malik ibn Anas narrated:
“Indeed, Ibn Shihab was asked by one of the Banu Umayyah about Sa'id ibn al-Musayyab. He mentioned him to him and informed him of his circumstances. This reached Sa'id ibn al-Musayyab.
So Ibn Shihab came and gave the salam to Sa'id, but Sa'id did not speak to him and did not return his greeting. When Sa'id departed, Ibn Shihab walked along with him and said: ‘Why is it that when I greeted you, you did not speak to me? Has nothing reached you about me except good?’ He replied: ‘Why did you mention me to the Banu Marwan?’”
[Hilyatul Awliya - Volume 3 - Page 366]
When Ibn Shihab al-Zuhri mentioned Sa'eed ibn al-Musayyib with praise to Banu Marwan (the Ummayyad authorities), Sa'eed became upset. He did not want any involvement with the rulers at his time, and being mentioned by Ibn Shihab al-Zuhri was disappointing to him.