def headers(msg, filter_keys=None):
    """Mailhog message headers with optional filtering"""
    return {
        k: ", ".join(v)
        for k, v in msg["Content"]["Headers"].items()
        if (not filter_keys or k in filter_keys)
    }