We have come across this problem many times on houses over the years. This happens when builders or carpenters use non-galvanised nails on the exterior of a house when building or restoring windows.
We are assuming from the off-set that replacing all the nails in the woodwork is not an option. So, after this, there are a few ways of preventing the stains from reappearing. The amount of time and effort that each of these repair methods adds to the overall paint job varies greatly, but the more thorough (and time-consuming) your approach, the longer lasting your results will be.
1. Before you start painting your woodwork, the standard sanding down and removal of loose material is necessary. While you do this make sure you lightly sand over each brown stain.
2. Apply several coats of a stain blocking primer/sealer with a rust inhibitor such as Zinister cover stain primer or Rustins rust primer. At least two coats should be applied to each and every stain. Prime about an inch around each stain.
A more extensive approach is to expose each nail head before priming. This process will probably get a few more years out of your final paint job.
1. After uncovering the nail heads, remove the rust as best you can by scraping, sanding or wire-brushing.
2. Then spot-prime each nail head immediately with the same primer described above.
1. Yet another option that may be worth the time and expense, especially if you are doing the job yourself, is exposing each nail head, removing the rust and then sinking each nail into the woodwork about 1/8″.
2. Apply primer over each nail, and fill each hole with a quality wood filler “Ronseal Epoxy Wood Filler”.
3. After the holes are filled, spot-prime each area with a high-quality oil or latex primer before applying the finish paint.
This is very time consuming, but short of replacing all nails, this is the best option.