Muwatta Imam Malik Book of Visions, Hadith 4
Yahya related to me from Malik from Yahya ibn Said that Abu Salama ibn Abd ar-Rahman said, "I heard Abu Qatada ibn Ribiyy say that he heard the Messenger of Allah ﷺ say, 'The good dream is from Allah, and the bad dream is from shaytan. When you see what you dislike, spit to your left side three times when you wake up, and seek refuge with Allah from its evil. It will not harm you then, Allah willing.' " Abu Salama said, "I would see dreams which weighed on me more heavily than a mountain. When I heard this hadith, I was not concerned about it."
وَحَدَّثَنِي عَنْ مَالِكٍ، عَنْ يَحْيَى بْنِ سَعِيدٍ، عَنْ أَبِي سَلَمَةَ بْنِ عَبْدِ الرَّحْمَنِ، أَنَّهُ قَالَ سَمِعْتُ أَبَا قَتَادَةَ بْنَ رِبْعِيٍّ، يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ " الرُّؤْيَا الصَّالِحَةُ مِنَ اللَّهِ وَالْحُلْمُ مِنَ الشَّيْطَانِ فَإِذَا رَأَى أَحَدُكُمُ الشَّىْءَ يَكْرَهُهُ فَلْيَنْفُثْ عَنْ يَسَارِهِ ثَلاَثَ مَرَّاتٍ إِذَا اسْتَيْقَظَ وَلْيَتَعَوَّذْ بِاللَّهِ مِنْ شَرِّهَا فَإِنَّهَا لَنْ تَضُرَّهُ إِنْ شَاءَ اللَّهُ " . قَالَ أَبُو سَلَمَةَ إِنْ كُنْتُ لأَرَى الرُّؤْيَا هِيَ أَثْقَلُ عَلَىَّ مِنَ الْجَبَلِ فَلَمَّا سَمِعْتُ هَذَا الْحَدِيثَ فَمَا كُنْتُ أُبَالِيهَا .