Quite a lateral-thinking question! The answer is "primary ciliary dyskinesia", and here's why.
The large airways and continuous structures (middle ear and nasal sinuses) are lined by ciliated cells (technically, ciliated pseudostratified columnar epithelium). Cilia are small tail-like cellular projections, and the above ones are 'motile' - they beat in a certain direction.
To get rid of inhaled debris in the large airways and their extensions, the epithelium there is lined by a layer of mucus which is sticky enough to trap particles in it. This mucus is propelled by the beating motion of the cilia towards the pharynx, where it is swallowed, usually unconsciously. (The transport of the mucus to the pharynx is sometimes called the 'mucociliary escalator'.)
Primary ciliary dyskinesia is a genetic condition (autosomal recessive) in which the cilia fail to work properly. The mucus and debris therefore tends not to be cleared and so gets infected. Thus the patient typically develops recurrent infections of the sinuses (sinusitis), middle ear (otitis media) and lung (pneumonia, atelectasis, bronchiectasis). The latter is the dominant reason why these patients usually have a chronic cough.
But why the infertility? Well, sperm cells have a tail that whips them forwards towards the egg. As it turns out, the tail (flagellum) of the sperm cell has a core structure that is identical to that of the cilia, and so it's function is also affected in primary ciliary diskinesia. Without a method of propulsion, the sperm cells cannot get to the female's egg cell (ovum) and infertility results.