You can easily tell if raw milk has gone bad.
Smell: it will develop a sour or unusual odour.
Colour: it may turn slightly yellow.
Curdling: it will curdle immediately when boiled.
To keep milk fresh, boil it soon after purchase, let it cool, and then refrigerate, it typically stays good for 4-5 days.