If you are subject to foul odors in your apartment, you may be entitled to a substantial rent decrease to compensate for the defect, until it's corrected. Legally, this adjustment is referred to as a rent abatement.For example, in one case on record, a 50% abatement was awarded due the presence of noxious fumes from a dry cleaning establishment in the building. Similar claims could be made for issues involving leaking gas pipes, or a stench from sewage plumbing defects.
A more common scenario involves secondhand cigarette smoke. If you smell it drifting in from another unit, it's a breach of warranty of habitability. Secondhand smoke is a health hazard, especially if you suffer from conditions like asthma, bronchitis or allergies. You can sue your landlord to correct it, if necessary.
To obtain an order to correct and a rent abatement, you have to prove the existence of the problem in Court. Keep a log of all times during which you detected odors. Also, have medical records available as evidence of any illness that is being aggravated by the smells. If more than one occupant in your apartment is affected, document that too.
By taking these steps, you may be able to win a reduction in rent commensurate with the loss of value in "services" the rental provides. If you prevail, the Court should also issue an order forcing the landlord to resolve the substandard conditions.