move mimes with randomly placed magic to header

This part is currently disabled and needs a rewrite.