“And it is incumbent upon him (i.e. the ruler) to prevent what the people have introduced by shaking hands after the Fajr, ʿAṣr and Jumuʿah prayers. It is to such an extent that today some of them even do it after all of the five prayers. All of this is considered bidʿah (innovation in the religion). The legislated time of shaking hands in the Sharīʿah is when the Muslim actually meets his brother, not at the immediate end of the five prayers. All of this is considered innovation. Where the Sharīʿah has implemented something, this is where we implement it. Accordingly, we prohibit this act and censure the person doing so, due to what he has done in opposition to the Sunnah.”
1 Al-Madkhal ilá Tanmiyah al-Aʿmāl bi Taḥsīn an-Niyāt wa at-Tanbīh ʿalá Bʿaḍ al-Bidʿah wa al-ʿAwaʾid allatī Intaḥalat wa Bayān Shanāʿatihi wa Qubhihi, (vol.2, pg. 219).