Is it Haraam for a man to shake a woman’s hand and vice versa except if it is her immediate family member?
Yes. It is prohbited. Sayyidatuna Aa’ishah (Radiyallahu Anha) narrates that Rasulullah (Sallallahu Alaihi Wasallam) had never shaken hands with a non-Mahram female ever. (Bulooghul Maraam).
When it comes to opposite genders, a female is only permitted to shake the hands of her Mahram male relatives and her husband. Similarly, a male is only permitted to shake the hands of his Mahram female relatives and his wife.
And Allah knows best
Suhail Tarmahomed (Mufti)
Jamiatul Ulama (KZN) Fatwa Department