Modified mucin-type O-glycosylation could be a direct mucosal response to hinder pathogenic colonisation and infection. Here, MUC5AC is linked to infection.