HeaderMatchRule can throw TypeError in re.search
The check() method in mailman.chains.headers.HeaderMatchRule calls email.message.get_all() to get the values of the header it's interested in from the message. It expects the returned values to be strings, but in some cases these can be email.header.Header objects. These need to be converted back to strings.