Sunan an-Nasa'i, Book 1, Hadith 154 (In-Book)

It was narrated that 'Ali said: "I said to Al-Miqdad: 'If a man is intimate with his wife and excretes prostatic fluid but does not have intercourse - ask the Prophet about that, for I am too shy to ask him about it since his daughter is married to me.' So he asked him, and he said: 'Let him wash his male member and perform Wudu' as for Salah.'"

أَخْبَرَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، قَالَ أَخْبَرَنَا جَرِيرٌ، عَنْ هِشَامِ بْنِ عُرْوَةَ، عَنْ أَبِيهِ، عَنْ عَلِيٍّ، - رضى الله عنه - قَالَ قُلْتُ لِلْمِقْدَادِ إِذَا بَنَى الرَّجُلُ بِأَهْلِهِ فَأَمْذَى وَلَمْ يُجَامِعْ فَسَلِ النَّبِيَّ صلى الله عليه وسلم عَنْ ذَلِكَ فَإِنِّي أَسْتَحِي أَنْ أَسْأَلَهُ عَنْ ذَلِكَ وَابْنَتُهُ تَحْتِي ‏.‏ فَسَأَلَهُ فَقَالَ ‏ "‏ يَغْسِلُ مَذَاكِيرَهُ وَيَتَوَضَّأُ وُضُوءَهُ لِلصَّلاَةِ ‏" ‏ ‏.‏

sunnah.com