The Messenger of Allah ﷺ led us in the dawn prayer at Hudaybiyah following a rainfall that had occurred during the night. When he finished, he turned to face the people and asked, "Do you know what your Lord has said?"They replied, "Allah and His Messenger know best."He said, "He has said, 'This morning some of My servants became believers in Me, and others disbelievers. Whoever said, We have been given rain by the grace and mercy of Allah, that one is a believer in Me and a disbeliever in the stars. But whoever said, We have been given rain by such and such a star, that one is a disbeliever in Me and a believer in the stars.'"
صلى لنا رسول الله ﷺ صلاة الصبح بالحديبية على إثر سماء كانت من الليل. فلما انصرف أقبل على الناس، فقال: أتدرون ماذا قال ربكم؟ قالوا: الله ورسوله أعلم. قال: قال: أصبح من عبادي مؤمن بي وكافر بي. فأما من قال: مطرنا بفضل الله ورحمته، فذلك مؤمن بي، كافر بالكوكب. وأما من قال: مطرنا بنوء كذا وكذا، فذلك كافر بي، مؤمن بالكوكب.
Malik narrated it in the Book of Rain Prayer (4) from Salih bin Kaysan, from Ubaydullah bin Abdullah bin Utba bin Masud, from Zayd bin Khalid, and he related it.Bukhari narrated it in the Book of Adhan (846), and Muslim in the Book of Faith (71), both through the route of Malik, with the same wording, similarly.