'Extracts IDs and such from <...> in list-headers.'

def _list_header_keywords(self, hdr, val_lower, body_info):

    words = []
    for word in val_lower.replace(',', '    ').split():
        if (not word):
            continue
        elif (word[:5] == '<http'):
            continue
        elif ((len(word) > 65) and ('+' in word) and ('@' in word)):
            continue
        elif (word[(-1):] == '>'):
            if (word[:8] == '<mailto:'):
                word = word[8:(-1)]
                if ('?' in word):
                    word = word.split('?')[0]
            elif (word[:1] == '<'):
                word = word[1:(-1)]
            else:
                continue
            if ((hdr == 'list-post') or ((hdr == 'list-id') and ('list' not in body_info))):
                body_info['list'] = word
            words.append(word)
            words.extend(re.findall(WORD_REGEXP, word))
    return set(words)
