I have no experience with raw milk sadly, but I sometimes get a sweet savory smell with my kefir - kind of more like cheese than yoghurt. Usually it happens when I leave it for too long, so I guess it gets 'overripe' in a way?
It's usually just the top layer (so when mixed with the rest of the jar it dissipates anyway). I certainly haven't come to any harm eating it.
Could you try fermenting your yoghurt for a shorter time?