Most the 'dirt' in sails is either fungus/mildew or iron/tannin staining.
Again just like cleaning mold and mildew inside the boat, the same 'chemicals' will apply to cleaning woven polyester dacron .... (NOT for laminated sails including 'cruising' dacron laminates):
Firstly, clean with a mild/diluted 'caustics' such as sodium silicate, TSP, lye based detergents. Spray-on/Wet out with the caustic, cover with a plastic tarp to soak (one hour, etc.) and let the caustic dissolve the funguses etc.; scrub with soft long handled bristle brush adding just enough water to keep the fabric wet and repeat, repeat, etc. as necessary. THEN thoroughly rinse with water.
Secondly, to remove iron, rust and TANNIN stains and discoloration (picked up from the water) .... obtain oxalic acid crystals (a pint) from a paint/hardware store. Keep adding the crystals to a gallon or two of HOT water until the crystals no longer dissolve .... use the soft bristle brush to apply the oxalic solution --- should almost instantly remove the iron/rust/tannin staining. Thoroughly rinse with water. THEN thoroughly dry the sail(s).
Best is to do this ON the boat (BUT not on a boat with NO exposed or bare teak, etc. !!!!!!!!!). On a windless/humid/cloudy day, just raise the sail as needed to apply/scrub/rinse, etc. ... then go sailing to dry the sails. But you'll then have to re-wax the boat as the caustic will strip the wax off the gelcoat.
Beware Oxalic Acid - use 'protection' - gloves/goggles/etc. as oxalic will rapidly absorb through your skin/corneas and collect in your kidneys as needle-like crystals that can/will destroy the nephrons of your kidneys. Without protection and at a minimum, you'll risk winding up with kidney stones. Use 'protection' when using oxalic acid.