said, “Do not begin the salām with the Jews or the Christians.” Other groups who are even more depraved—such as the Sikhs, the idol-worshippers, the communists, and all who resemble them—are in the same ruling: do not pronounce the greeting of peace to them or offer salām.
The same applies to an openly sinful Muslim (one who publicises his misconduct). If withholding the salām would be of benefit—namely, that by your refraining he might repent and return to Allah—then leave off the greeting. But if no benefit is gained, and whether you greet him or do not greet him is all the same to him, while your omission only breeds enmity in his heart and causes him to persist in his wrongdoing and refuse your counsel, then greet him.
From the foregoing, people fall into three categories:
1- The first category: an openly sinful Muslim. Greet him unless there is a benefit in boycotting him.
2- The second category: a disbeliever. Do not initiate salām with him, but if he greets you, return the greeting.
3- The third category: a Muslim about whom you know no sin. Greet him, and take care to be the one who begins with salām, for the Prophet (may Allah bless him and grant him peace)—the noblest of creation—would initiate salām with whomever he met.
He also said, “It is not lawful for a believer to boycott his brother for more than three days; they meet, and this one turns away and that one turns away…”