Most everyone who owns a boat knows that sinking feeling you get when you open the cabin door after the boat's been locked up for a few days. It's that damp mildew smell possibly mixed with odors from the head, petrol chemicals in the engine compartment, stale tobacco odors, odors from the galley, etc. The smell is a little embarrassing for guests you bring on-board in addition to how your on-board clothing, cushions and bedding smells.
The majority of boat odors emanate from the bilge. The water in the bilge gets nasty. There are oil and fuel odors. Holding tanks leach odors into the bilge. Mold, mildew and bacteria build up. All those smells end up in your cabin and is not nose friendly as well as not healthy. Mold and mildew build up in the bilge and permeate to the cabin. Air fresheners do not work, they just cover up the odors. Air filter may be a temporary solution but as soon as they are turned off, the odor returns. What needs to be done is to stop the odors at the source.
Some measures needed to be aware of in the bilge are making sure all your hoses are properly clamped (below water level double clamped). Check you bilge pump periodically by lifting the float to make sure it engages. Use engine oil catch tray or absorbent pads under the engine to capture leaking oils. Use a good detergent like liquid Tide (phosphate free) to clean the bilge. Put a cup or so of Tide in the bilge water and go for a ride. The sloshing water will clean the bilge bottom, then water-vac it out and rinse. Do not pump the bilge water with the Tide into the water (it's illegal).
Now that your bilge is in good shape lets keep it odor free. Quantum Pure Aire has been making air purifiers for the marine industry for over 20 years. Their products have been written up in all the major boating magazines for years. They have several models for different applications. They work with low level ozone generation and attack airborne contaminants and control the source of the contaminants.
The best solution for bilge odor control is a product called the BilgeBuster. Quantum's BilgeBuster (TM) effectively eliminates odors from Holding Tanks, Gray Water, Gas and Diesel fumes while prohibiting the growth of harmful Mold and Mildew. US Coast Guard Labs FCC 15B (non-interference) approved and is absolutely safe for use in the bilge where gasoline, diesel, and propane fumes will often accumulate.
Hundreds of boats have installed these units in their bilge and in a couple of days stopped ods that had been fight with for years. They work on boats from 20 footers to mega yachts. It's a great system, check it out.
In addition, there are cabin units to control cooking odors, tobacco odors, pet odors, mildew in the cabin, etc.