Shaykh Abdul Sattar al-Hammad
Hadith Commentary:
The requirement of spreading the greeting of peace (salam) is precisely that men should also greet women with salam, as we have mentioned with reference to Asma bint Yazid radi Allahu anha, and that women should greet men with salam, as Umm Hani radi Allahu anha greeted the Messenger of Allah sallallahu alayhi wa sallam.
(Sahih al-Bukhari, al-Adab, Hadith: 6158)
Even though the Prophet sallallahu alayhi wa sallam was a non-mahram for Umm Hani radi Allahu anha, nevertheless, it is also very important to safeguard oneself from temptation and corruption (fitnah wa fasad). Therefore, if there is a fear of fitnah, women should refrain from greeting men with salam; otherwise, the requirement of spreading salam is that men greet women and women greet men.
And Allah knows best.
Source: Hidayat al-Qari: Commentary on Sahih Bukhari, Urdu, Page: 6248