Animals such as dogs have a good sense of smell too and can of course retrained to seek out drugs and even medical conditions such as cancer(s).
I guess we need to look at the chemistry how far can compounds travel (I think they are called Aromatic compounds) but that may be too narrow for many cases here.
@freemo will probably have a better grasp of the chemistry here.