Yes, dairy farmers may drink unpasteurized milk from their cows. Regulations do not prohibit dairy farmers from consuming their own product, but this does not mean they are immune to the risks associated with consuming raw milk.
The state of health of modern herds, the hygiene rules governing milking and storage at the farm, and the numerous food safety and quality controls that producers implement result in the exceptionally high quality of the milk produced today. Furthermore, the raw milk consumed by producers is very fresh (same day). The cold chain is never broken, except for the few minutes that it takes to go from the bulk tank to their house. This reduces the risk of pathogen growth. With continual consumption, producers may develop a degree of resistance to certain pathogens. These are the reasons that farmers generally do not get sick from consuming raw milk on their farm.
However, despite all these favourable conditions, it does not give producers absolute protection against the risks that can be associated with the consumption of raw milk.
In addition, producers usually offer store-bought, pasteurized milk to their visitors, as they are not use to consuming raw milk and can become ill from drinking it.
Finally, it is still illegal for a dairy farmer to sell raw milk. For more information visit Seth’s question.