Depends entirely on the state. In Wisconsin, the "dairy capital of the world", its illegal except for incidental sales directly from the dairy farm.

Reason being they don't want outbreaks to be linked to Wisconsin's dairy industry.