The Yanmar people at Mack Boring suggest that you run the diesel at cruising speed(80% of max.rpm) for a few hours a couple of times a season. This fully heats the oil and burns off any moisture in the oil. Idling will not do that. This procedure counteracts the water that condenses in the oil when you only run the engine a few minutes at a time.
Besides, one of the great moments of a sail happens when the sails are up, the boat starts to heel and you shut off the engine and listen to the wind and the water.