Mail Access Control Store (mail/mail_access_control.py)

QwenPaw · src/qwenpaw/app/mail/mail_access_control.py · python · Apache-2.0
email, auth, tag:whitelist, tag:blacklist, tag:json-storage

Manages per-agent email sender whitelist/blacklist/pending-approval entries, persisted to JSON with domain-wildcard support for bulk allow/deny rules.

# Source: https://github.com/agentscope-ai/QwenPaw | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
# Provided via justclaw.it.com; keep this notice with the code.
# -*- coding: utf-8 -*-
"""Mail access control store for per-agent sender
whitelist/blacklist management.

Persists per-agent mail ACL (whitelist, blacklist, pending approval) entries
to a JSON file under the working directory.  Supports domain-wildcard entries
(e.g. ``*@example.com``) for bulk allow/deny by domain.
"""

from __future__ import annotations

import json
import logging
import re
import threading
import time
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Tuple

from ...constant import WORKING_DIR
from ...utils.io_utils import write_json_atomic

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key