The imapautofiler.i18n Module

imapautofiler.i18n.get_header_value(msg, name)

Handle header decoding and return a string we examine.