The Ministry for Primary Industries says consumers need to take care when drinking raw unpasteurised milk as it is a high-risk food.
MPI director animal and animal products Dr Paul Dansted said the ministry had seen a number of recent recalls of raw milk.
"It's important that consumers remember and understand that there are risks with drinking raw milk," he said.
Raw milk is milk that has not been pasteurised (heat treated) to kill harmful bacteria such as Campylobacter, Listeria and toxin-producing strains of E. coli potentially present in the milk.
In 2014, MPI put in place new rules which mean farmers selling raw milk need to meet food safety requirements, but consumers still need to take care when drinking raw milk, he said.
"Some people who drink raw milk may not always fully understand the risks and don't realise that there is the possibility of getting sick from the harmful bacteria in the milk.
"Pregnant women, young children - particularly babies, the elderly, and people with weakened immune systems should not drink raw milk as they are at greatest risk of getting sick and the consequences for them can be more severe, and in some cases can lead to death," says Dr Dansted.
"No matter how carefully the animals are milked, there is always a risk that harmful bacteria can get into the milk. There is no way of telling by taste, sight or smell if the milk you are drinking contains harmful bacteria, so we recommend that people heat their raw milk until just boiling, or to 70C for one minute, before drinking it."
The MPI said keeping raw milk refrigerated (4°C or less) also reduced the risk of any harmful bacteria in the milk growing to levels which make people sick when they drink it. People should discard the milk if it has been left out of the fridge for two hours or more and drink it by its use-by date.
"People who choose to drink raw milk should make sure they are getting their milk directly from the farmer and are only buying it for personal and household consumption."