import requests


def lookup_mailinglists(prefix):
    """Find all mailing lists owned by `prefix`"""
    req = requests.get("https://lists.srcf.net/getlists.cgi", params={'prefix': prefix})
    req.raise_for_status()
    assert req.headers['content-type'].split(';')[0] == 'text/plain'
    return [listname for listname in req.text.split("\n") if listname]