Sunan Ibn Majah, Book 27, Hadith 19 (Ibn Majah 3182)

It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) came to a man from among the Ansar who had picked up a knife to slaughter an animal for the Messenger of Allah (ﷺ). The Messenger of Allah (ﷺ) said to him:

“Avoid those that are lactating.” (i.e. those from which milk is received).