import re


def extract_name(addr):
    """ Extract name and email from from: header """
    m = re.match(r"^([^<]+)\s*<(.+)>$", addr)
    if m:
        return [m.group(1), m.group(2)]
    addr = addr.strip("<>")
    return [addr, addr]