We live in an agricultural area where the farmers tend to use chicken manure for fertilizer. This causes us fly problems, particularly following a wet winter like the one we had this year. We all know that blow flies are a threat to martins, as well as other birds.
If you are looking for a great, passive preventative measure against all flies, I recommend a product called "Red Top Flycatchers". I use them whenever the flies start to annoy us, and they work amazingly. Just hang them and forget them for a few weeks. They can be purchased in two-packs online. They are worth every penny, and can help our birds, too.
(I have no vested interest in this product other than its usefulness to me and the fact that I hate flies worse than just about anything! Lol)