Get and store message flags.